aboutsummaryrefslogtreecommitdiff
path: root/src/string_immutable.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2022-02-06 00:25:35 -0800
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2022-02-06 00:25:35 -0800
commite459ee472f7049372d134d8c9a6724b8dd3d9499 (patch)
tree1b0450498fd06fe4f9daca2a11e03e58b537395d /src/string_immutable.zig
parenta6ee900aafb27081b84f242c05353aa265be4850 (diff)
downloadbun-jarred/esbuild-plugin-api.tar.gz
bun-jarred/esbuild-plugin-api.tar.zst
bun-jarred/esbuild-plugin-api.zip
Diffstat (limited to 'src/string_immutable.zig')
-rw-r--r--src/string_immutable.zig6
1 files changed, 5 insertions, 1 deletions
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 });
}