Strings are a core component of any programming language. Until the day we can program, and interact, with our computers completely through verbal and audio cues, text will continue to be our primary method of interfacing with these machines. Most other programming languages have sufficiently advanced native string support, yet surprisingly Objective-C relies on Apple’s Foundation library to provide anything more advanced than the low-level string functions provided by C.
Swift’s powerful native string type (conveniently named
String) is designed to coexist with
NSString. Given the extent to which
NSString is embedded in the AppKit and UIKit frameworks, being able to use
String wherever an
NSString is expected (and vice versa) ...