aboutsummaryrefslogtreecommitdiff
path: root/src/string_immutable.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/string_immutable.zig')
-rw-r--r--src/string_immutable.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/string_immutable.zig b/src/string_immutable.zig
index 2e07f04ba..c0b72d178 100644
--- a/src/string_immutable.zig
+++ b/src/string_immutable.zig
@@ -97,6 +97,10 @@ pub fn endsWithAnyComptime(self: string, comptime str: string) bool {
pub fn eql(self: string, other: anytype) bool {
if (self.len != other.len) return false;
+ if (comptime @TypeOf(other) == *string) {
+ return eql(self, other.*);
+ }
+
for (self) |c, i| {
if (other[i] != c) return false;
}