From bfc5a70fee3b065f523ae5c4754867c497ce87ea Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Sun, 24 Aug 2025 02:42:35 -0700 Subject: [PATCH] asciiUpper: use dupeZ --- src/asciiUpper.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/asciiUpper.zig b/src/asciiUpper.zig index 57e2e292df9230e6314a28dff88b3ed9d720d0f1..35d766512b02b444c7199849ab6d2d3c5e2559a1 100644 --- a/src/asciiUpper.zig +++ b/src/asciiUpper.zig @@ -2,8 +2,8 @@ const std = @import("std"); const string = []const u8; const extras = @import("./lib.zig"); -pub fn asciiUpper(alloc: std.mem.Allocator, input: string) ![]u8 { - var buf = try alloc.dupe(u8, input); +pub fn asciiUpper(alloc: std.mem.Allocator, input: string) ![:0]u8 { + var buf = try alloc.dupeZ(u8, input); for (0..buf.len) |i| { buf[i] = std.ascii.toUpper(buf[i]); } -- 2.54.0