pub fn cutPrefix(comptime T: type, slice: []const T, prefix: []const T) ?[]const T T: typeslice: []const Tprefix: []const T3229
3230
3231pub fn cutPrefix(comptime T: type, slice: []const T, prefix: []const T) ?[]const T {
return if (startsWith(T, slice, prefix)) slice[prefix.len..] else null;
}
If
slicestarts withprefix, returns the rest ofslicestarting atprefix.len.