3 ms·
I would point you to Swift's implementation of its "Character" type. Swift string handling is a model for how programming languages should approach Unicode char
by piersadrian 10y ago
I would point you to Swift's implementation of its "Character" type. Swift string handling is a model for how programming languages should approach Unicode characters and their complex combinations. The standard interface into all Swift strings is its "Character" type, which works exclusively with grapheme clusters.
[1] https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/StringsAndCharacters.html#//apple_ref/doc/uid/TP40014097-CH7-ID293 https://developer.apple.com/library/content/documentation/Sw...
- smackfu 10y agoAnd they are changing a bunch of it for Swift 4: https://github.com/apple/swift/blob/master/docs/StringManifesto.md https://github.com/apple/swift/blob/master/docs/StringManife...