Swift String Cheat Sheet
useyourloaf.com
useyourloaf.com
> Swift is Unicode correct so the equality operator (“==”) checks
> for Unicode canonical equivalence.
I think this is what this implies, but does Swift do grapheme canonicalization/normalization here? And which one? It might be worth adding the "Noël problem" here."Every instance of Swift’s Character type represents a single extended grapheme cluster. An extended grapheme cluster is a sequence of one or more Unicode scalars that (when combined) produce a single human-readable character."
And then later:
"For example, LATIN SMALL LETTER E WITH ACUTE (U+00E9) is canonically equivalent to LATIN SMALL LETTER E (U+0065) followed by COMBINING ACUTE ACCENT (U+0301). Both of these extended grapheme clusters are valid ways to represent the character é, and so they are considered to be canonically equivalent"
http://www.h4labs.com/dev/ios/swift_cookbook.html?topic=stri...
Something that's not on either page but if you use SQLite, it's important to be able to convert a C string:
let str:String = String.fromCString(UnsafePointer<CChar>(sqlite3_column_text(statement, columnCtr)))!
Make sure you don't have NULL columns.