3 ms·
It's useful for any and all operations that involve indexing a range. Yes you locate the specific indexes by using extended grapheme clusters, but you use the
by ChrisSD 6y ago
It's useful for any and all operations that involve indexing a range.
Yes you locate the specific indexes by using extended grapheme clusters, but you use the retrieved byte indexes to actually perform the basic operations. These indexes can also be cached so you don't have to recalculate their byte position every time (so long as the string isn't modified).
- deleted 6y ago[deleted]
- masklinn 6y ago> It's useful for any and all operations that involve indexing a range. That has little to do with the string length, those indices can be completely opaque for all you care. > Yes you locate the specific indexes by using extended grapheme clusters Do you? I'd expect that the indices are mostly located using some sort of pattern matching.