.hasSuffix

Technically, this is unspecified, but I'm pretty strongly in favor of guaranteeing it, at least on a initializer-by-initializer basis (e.g. imagine a future putMeInNFC initializer).

Related, we should have lazily-normalized-scalar views for NFC, NFD, NFKC, and NFKD (and maybe FCC, with a compelling reason). This would allow the user can say something like myString.unicodeScalars.nfkd to get a BidirectionalCollection of Unicode.Scalar in NFKD, lazily normalizing segment-by-segment. This was discussed briefly in String case folding and normalization APIs - #3 by Michael_Ilseman and we'll likely revisit it after Swift 5.

1 Like