removeSubrange(_:)
Removes the characters in the given range.
Declaration
mutating func removeSubrange(_ bounds: Range<String.Index>)Parameters
- bounds:
The range of the elements to remove. The upper and lower bounds of
boundsmust be valid indices of the string and not equal to the string’s end index.
Discussion
Calling this method invalidates any existing indices for use with this string.