String
public extension String
-
Converts given Range to NSRange in this string.
Declaration
Swift
func makeNSRange(from range: Range<String.Index>) -> NSRange
Parameters
range
Range to convert.
-
Created String Range from given NSRange. Returns nil if range cannot be converted.
Declaration
Swift
func rangeFromNSRange(range: NSRange) -> Range<String.Index>?
Parameters
range
Range to convert.
-
Returns ranges of given CharacterSet in this string.
Declaration
Swift
func rangesOf(characterSet: CharacterSet) -> [Range<String.Index>]
Parameters
characterSet
CharacterSet to find.