Replaces the elements within the specified bounds with the given Unicode scalar values.
- Xcode 7.1+
- Swift Standard Library
The range of elements to replace. The bounds of the range must be valid indices of the view.
The new Unicode scalar values to add to the string.
Calling this method invalidates any existing indices for use with this string.
Complexity: O(m), where m is the combined length of the view and
new. If the call to
replace simply removes elements at the end of the string, the complexity is O(n), where n is equal to