2 ms·
> What I want is the literal offset of a string slice in another, aka pointer arithmetic in C: I see, I'd misunderstood the original, sorry. > this should be
by masklinn 6y ago
> What I want is the literal offset of a string slice in another, aka pointer arithmetic in C:
I see, I'd misunderstood the original, sorry.
> this should be doable safely
The language doesn't know that there's any relationship between those two strings, so the method would probably need to be fallible, and be more convoluted than this.