|
|
|
|
|
by fauigerzigerk
145 days ago
|
|
>The other point I've seen is that its string library is slow and very accurate. Swift strings default to operating on grapheme clusters, which is relatively slow. But you can always choose to work with the underlying UTF-8 representation or with unicode scalars, which is fast. The only situation where UTF-8 incurs overhead is if the String comes from some old Objective-C API that gives you a UTF-16 encoded String. |
|
The unicode-segmentation crate implements this for Rust, in case it matters for accuracy.