summaryrefslogtreecommitdiff
path: root/src/code_point.zig
diff options
context:
space:
mode:
authorGravatar Sam Atman2025-05-13 16:33:02 -0400
committerGravatar Sam Atman2025-05-15 15:31:16 -0400
commit7ff729895e72fc841440ec73a44c142779fcae1e (patch)
tree8917658e78f42d14a824f2595664b0a88f018c3a /src/code_point.zig
parentAdd wordAtCursor (diff)
downloadzg-7ff729895e72fc841440ec73a44c142779fcae1e.tar.gz
zg-7ff729895e72fc841440ec73a44c142779fcae1e.tar.xz
zg-7ff729895e72fc841440ec73a44c142779fcae1e.zip
Reverse Word Iterator
Next up I hook it to the tests.
Diffstat (limited to 'src/code_point.zig')
-rw-r--r--src/code_point.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/code_point.zig b/src/code_point.zig
index 79ee5cd..a5b10d4 100644
--- a/src/code_point.zig
+++ b/src/code_point.zig
@@ -12,7 +12,7 @@ pub const CodePoint = struct {
12 offset: u32, 12 offset: u32,
13 13
14 /// Return the slice of this codepoint, given the original string. 14 /// Return the slice of this codepoint, given the original string.
15 pub fn bytes(cp: CodePoint, str: []const u8) []const u8 { 15 pub inline fn bytes(cp: CodePoint, str: []const u8) []const u8 {
16 return str[cp.offset..][0..cp.len]; 16 return str[cp.offset..][0..cp.len];
17 } 17 }
18}; 18};