The Swift String API is hard to get used to. It has also changed over time as the Swift language and the standard library have developed. I first wrote this guide for Swift 2 and have since needed to update it for Swift 3, 4 and now Swift 5. So for my future reference and yours if you are struggling to make sense of it all here is my Swift String Cheat Sheet: Last updated: Nov 10, 2022 Xcode Playg