4 ms·
Maybe have m,n refer to grapheme clusters instead of bytes/code points?
by RedNifre 6y ago
Maybe have m,n refer to grapheme clusters instead of bytes/code points?
- mojuba 6y agoApparently it's what Swift does when you try to get the length of a string. Though there's no more plain substring() since Swift 5, it was removed to indicate it's no longer O(1). You will get different results across languages though.