5 ms·
One unicode character at a time or one unicode codepoint at a time? (see character composition)
by panzi 13y ago
One unicode character at a time or one unicode codepoint at a time? (see character composition)
- kvb 13y agoGood point - I meant one codepoint at a time.
- kvb 13y agoBut I was wrong and it's actually by grapheme, as danbruc correctly notes.
- masklinn 13y agoCodepoint. Java 5 also added new string APIs for this. IIRC, Cocoa is one of the very few frameworks/languages/whatever which provides APIs for manipulating and iterating on grapheme clusters out of the box. And provides a page explaining some of the unicode concepts and how they map to NSString: https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Strings/Articles/stringsClusters.html#//apple_ref/doc/uid/TP40008025 https://developer.apple.com/library/mac/documentation/Cocoa/...
- danbruc 13y agoThe .NET StringInfo class provides methods to work at the grapheme level, not code points.