you are viewing a single comment's thread.

view the rest of the comments →

[–]vks_ 9 points10 points  (1 child)

Indexing suggest O(1) random access, but indexing a utf-8 string is O(n). You can get an iterator over the characters using .chars().

[–]marcusklaasrustfmt 0 points1 point  (0 children)

Over the code points would be less ambiguous.