Subscripts
The following subscripts are available globally.
-
Returns a string object containing the characters of the String that lie within a given range.
Note
Will return a string with a length of
endIndex - startIndexcharactersWarning
Will crash if range include positions out of the string.
Declaration
Swift
public subscript(range: Range<Int>) -> String { get }Parameters
rangeRange of the string to be returned.
Return Value
Substring at given range.
View on GitHub
Install in Dash
Subscripts Reference