3 ms·
Not if the "iterating over character" function iterates over actual characters and not codepoints.
by adrianN 9y ago
Not if the "iterating over character" function iterates over actual characters and not codepoints.
- johncolanduoni 9y agoYou mean grapheme clusters? Swift is the only language I know that uses that by default, and you still wouldn't want to store strings as a list of grapheme clusters.
- deleted 9y ago[deleted]
- cannam 9y agoI believe Perl 6 does so as well, see e.g. https://perl6advent.wordpress.com/2015/12/07/day-7-unicode-perl-6-and-you/ https://perl6advent.wordpress.com/2015/12/07/day-7-unicode-p...
- jswny 9y agoElixir as well.
- e12e 9y agoThe apple dev documentation has a nice overview of some of the concerns that need to be taken into account for this to work: https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Strings/Articles/stringsClusters.html https://developer.apple.com/library/content/documentation/Co... It's probably one of the better approaches - but it's still not clear if it (alone) allows a developer that speaks only English to develop a text indexing or editing system that works well across English, Japanese, Arabic, Hangul and Dutch for example.
- dragonwriter 9y agoThe problem is “actual characters” are an ill-defined term; that could mean either code points or graphemes. See, e.g., http://unicode.org/faq/char_combmark.html http://unicode.org/faq/char_combmark.html