I need to determine if a string contains any of the characters from a custom set that I have defined.
I see from this post that you can use rangeOfString to determine
Use like this in swift 4.2
var string = "Hello, World!" let charSet = NSCharacterSet.letters if string.rangeOfCharacter(from:charSet)?.isEmpty == false{ print ("String contain letters"); }