3 ms·
Indeed Swift is one of the very few languages that even have a stdlib API for working with this intuitive definition of a "character" (the technical Unicode ter
by Sharlin 4y ago
Indeed Swift is one of the very few languages that even have a stdlib API for working with this intuitive definition of a "character" (the technical Unicode term is "(extended) grapheme cluster" and the division of text into EGCs is called Unicode text segmentation, described by [uax29] – spoiler: definitely not trivial).
[uax29]: https://unicode.org/reports/tr29/ https://unicode.org/reports/tr29/
- alwaysbeconsing 4y agoThere's no Swift involved here; this is in WebKit.