How can I convert NSRange to Range in Swift?
NSRange
Range
I want to use the following UITextFieldDelegate method:
UITextFieldDelegate
As of Swift 4 (Xcode 9), the Swift standard library provides methods to convert between Swift string ranges (Range) and NSString ranges (NSRange). Example:
NSString
let str = "a