Re:UTF-8 String Indexing Strategies
by richardwhiuk on Thursday May 30, 2019 @06:34AM
(#20049841)
I think that accessing characters by index is _probably_ a code smell in most places, especially if that string may contain arbitrary UTF-8.
[ Parent
| on HN ]
Accessing string content by arbitrary indices is probably an error. Accessing string content by indices you got from previous lookups is useful for a number of situations.
If you have an index from a previous lookup, that can be a byte index.