diff options
Diffstat (limited to 'src/string.zig')
-rw-r--r-- | src/string.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/string.zig b/src/string.zig index 1305e5884..c90efa044 100644 --- a/src/string.zig +++ b/src/string.zig @@ -786,6 +786,8 @@ pub const String = extern struct { } pub fn indexOfComptimeArrayCaseInsensitiveSameLength(this: String, comptime values: []const []const u8) ?usize { + if (values.len == 0) return null; + if (this.is8Bit()) { const bytes = this.byteSlice(); |