News for hackers. Stuff that matters.
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.
Re:UTF-8 String Indexing Strategies by masklinn on Thursday May 30, 2019 @06:43AM (#20049885)
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.
Re:UTF-8 String Indexing Strategies by scatters on Thursday May 30, 2019 @09:35AM (#20050946)
If you have an index from a previous lookup, that can be a byte index.
Re:UTF-8 String Indexing Strategies by raiph on Thursday May 30, 2019 @06:50PM (#20056721)
You're right to the degree that people probably aren't using P6. :)