Get nth character of a string in Swift
Attention: Please see Leo Dabus’ answer for a proper implementation for Swift 4 and Swift 5. Swift 4 or later The Substring type was introduced in Swift 4 to make substrings faster and more efficient by sharing storage with the original string, so that’s what the subscript functions should return. Try it out here extension … Read more