#How can I compare a slice and an array or string?
1 messages · Page 1 of 1 (latest)
a 1 character and 2 character string can never match
did you mean if (std.mem.eql(u8, data[i..][0..2], "</")), or if you aren't sure data.len >= i + 2, you can do if (std.mem.startsWith(u8, data[i..], "</")) instead
Is the range exclusive on the upper bound?
yes