You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But slicing a string at a byte index that's not a char index (i.e. is in the middle of a utf-8 codepoint) is invalid: https://stackoverflow.com/questions/51982999/slice-a-string-containing-unicode-chars
The function would panic if two of the given strings contain codepoints that start with the same byte but differ after that.
Using char_indices would fix this :)