From e459ee472f7049372d134d8c9a6724b8dd3d9499 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Sun, 6 Feb 2022 00:25:35 -0800 Subject: WIP --- src/string_immutable.zig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/string_immutable.zig') diff --git a/src/string_immutable.zig b/src/string_immutable.zig index 207b6634d..e6ee76634 100644 --- a/src/string_immutable.zig +++ b/src/string_immutable.zig @@ -433,7 +433,7 @@ pub fn eqlCaseInsensitiveASCII(a: string, comptime b: anytype, comptime check_le return true; } -pub fn eqlLong(a_: string, b: string, comptime check_len: bool) bool { +pub fn eqlLongWithType(comptime Type: type, a_: Type, b: Type, comptime check_len: bool) bool { if (comptime check_len) { if (a_.len == 0) { return b.len == 0; @@ -483,6 +483,10 @@ pub fn eqlLong(a_: string, b: string, comptime check_len: bool) bool { return true; } +pub fn eqlLong(a_: string, b: string, comptime check_len: bool) bool { + return eqlLongWithType(string, a_, b, check_len); +} + pub inline fn append(allocator: std.mem.Allocator, self: string, other: string) !string { return std.fmt.allocPrint(allocator, "{s}{s}", .{ self, other }); } -- cgit v1.2.3