| ... | @@ -2,8 +2,8 @@ const std = @import("std"); | ... | @@ -2,8 +2,8 @@ const std = @import("std"); |
| 2 | const string = []const u8; | 2 | const string = []const u8; |
| 3 | const extras = @import("./lib.zig"); | 3 | const extras = @import("./lib.zig"); |
| 4 | | 4 | |
| 5 | pub fn asciiUpper(alloc: std.mem.Allocator, input: string) ![]u8 { | 5 | pub fn asciiUpper(alloc: std.mem.Allocator, input: string) ![:0]u8 { |
| 6 | var buf = try alloc.dupe(u8, input); | 6 | var buf = try alloc.dupeZ(u8, input); |
| 7 | for (0..buf.len) |i| { | 7 | for (0..buf.len) |i| { |
| 8 | buf[i] = std.ascii.toUpper(buf[i]); | 8 | buf[i] = std.ascii.toUpper(buf[i]); |
| 9 | } | 9 | } |