Instance Method

rangeOfCharacter(from:)

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

Declaration

func rangeOfCharacter(from searchSet: CharacterSet) -> NSRange

Parameters

aSet

A character set. This value must not be nil.

Raises an invalidArgumentException if aSet is nil.

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.