1const std = @import("std");
2const string = []const u8;
3const extras = @import("./lib.zig");
4
5pub fn asciiLower(alloc: std.mem.Allocator, input: string) ![:0]u8 {
6 var buf = try alloc.dupeZ(u8, input);
7 for (input, 0..) |c, i| buf[i] = std.ascii.toLower(c);
8 return buf;
9}
10
11pub fn asciiLowerComptime(comptime input: string) [:0]u8 {
12 var buf: [input.len + 1]u8 = undefined;
13 for (input, 0..) |c, i| buf[i] = std.ascii.toLower(c);
14 buf[input.len] = 0;
15 const result = buf[0..input.len :0];
16 return result;
17}