rangeOfCharacter(from:options:)
Finds and returns the range in the string of the first character, using given options, from a given character set.
Declaration
func rangeOfCharacter(from searchSet: CharacterSet, options mask: NSString.CompareOptions = []) -> NSRangeParameters
Return Value
The range in the receiver of the first character found from aSet. Returns a range of {``NSNotFound``, 0} if none of the characters in aSet are found.
Discussion
Invokes rangeOfCharacter(from:options:range:) with mask for the options and the entire extent of the receiver for the range.
See Also
Finding Characters and Substrings
contains(_:)localizedCaseInsensitiveContains(_:)localizedStandardContains(_:)rangeOfCharacter(from:)rangeOfCharacter(from:options:range:)range(of:)range(of:options:)range(of:options:range:)range(of:options:range:locale:)localizedStandardRange(of:)enumerateLines(_:)enumerateSubstrings(in:options:using:)