substring(from:)
Returns a new string containing the characters of the receiver from the one at a given index to the end.
Declaration
func substring(from: Int) -> StringParameters
- from:
An index. The value must lie within the bounds of the receiver, or be equal to the length of the receiver.
Raises an Rangeexception if (
anIndex- 1) lies beyond the end of the receiver.
Return Value
A new string containing the characters of the receiver from the one at anIndex to the end. If anIndex is equal to the length of the string, returns an empty string.