Contents

rangeOfCharacter(from:)

Finds and returns the range in the string of the first character from a given character set.

Declaration

func rangeOfCharacter(from searchSet: CharacterSet) -> NSRange

Parameters

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:) with no options.

See Also

Finding Characters and Substrings