String
struct String
An extension to assist in retrieving substrings.
-
Retrieves the Character at index i. Called using variable_name[i].
Declaration
Swift
subscript (i: Int) -> CharacterParameters
iThe index of the wanted Character, as an Int.
Return Value
Character at index i.
-
Retrieves the Character at the specified index of a String. Called using variable_name[i].
Declaration
Swift
subscript (i: Int) -> StringParameters
iThe index of the wanted Character, as an Int.
Return Value
The Character at index i, as a String.
-
Returns a substring from the specified range.
Declaration
Swift
subscript (r: Range<Int>) -> StringParameters
rRange of Int containing the indices of the wanted Characters in the String.
Return Value
The substring represented by r, as a String.
String Extension Reference