Here's the thing: You simply don't do that, ever. It's a meaningless operation. Most you would do is iterate over a string.
Here's the thing: You simply don't do that, ever. It's a meaningless operation. Most you would do is iterate over a string.
Computed indicies into strings are a no-go but that is far from the only use case.
What I mean is that "extract the 42th codepoint/glyph/whatever from this UTF-8 string" is a pointless operation for free-form strings because in a free-form string the character position is meaningless.
(Basically all non-ASCII UTF-8 is pretty much a black box. You can't do serious computation with general Unicode because it's so complex and, as a consequence, ill-defined in practice).
Doesn't work well with BIDI languages, or Mongolian. Seriously if you haven't tested with Mongolian your code is probably wrong.
You can do that just fine with UTF8, both Swift and Rust allow it.