From ae5d7a0c310c7b0acd7a51e97ee46893f3d5b79e Mon Sep 17 00:00:00 2001 From: Jose Colon Rodriguez Date: Sat, 17 Feb 2024 13:31:45 -0400 Subject: Fixed isAsciiOnly and CodePointIterator ASCII bugs --- src/main.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main.zig') diff --git a/src/main.zig b/src/main.zig index 38ba343..7ff07ee 100644 --- a/src/main.zig +++ b/src/main.zig @@ -6,7 +6,7 @@ const std = @import("std"); // const codePointWidth = @import("display_width").codePointWidth; // const strWidth = @import("ziglyph").display_width.strWidth; const strWidth = @import("display_width").strWidth; -const CodePointIterator = @import("CodePoint").CodePointIterator; +// const CodePointIterator = @import("CodePoint").CodePointIterator; pub fn main() !void { var gpa = std.heap.GeneralPurposeAllocator(.{}){}; @@ -16,12 +16,12 @@ pub fn main() !void { const input = try std.fs.cwd().readFileAlloc(allocator, "lang_mix.txt", std.math.maxInt(u32)); defer allocator.free(input); - var result: usize = 0; - // var result: isize = 0; // var iter = GraphemeIterator.init(input); // var iter = CodePointIterator{ .bytes = input }; var iter = std.mem.splitScalar(u8, input, '\n'); + var result: usize = 0; + // var result: isize = 0; var timer = try std.time.Timer.start(); // for (0..50) |_| { -- cgit v1.2.3