It's a low level memory operation. It's just a sliding window along an array in memory. It's presented in examples as a string tool (as [_]const u8 are the easiest array to create in a small example snippet), but it's really not. Low level memory operations are useless when dealing with real world strings (except that they may be blocks to build higher-level ops).
It's a low level memory operation. It's just a sliding window along an array in memory. It's presented in examples as a string tool (as [_]const u8 are the easiest array to create in a small example snippet), but it's really not. Low level memory operations are useless when dealing with real world strings (except that they may be blocks to build higher-level ops).
What you want is github.com/JakubSzark/zig-string that does exactly that.
zig-string isn't bad, but it's missing some stuff.