Instance Method

makeContiguousUTF8()

If this string is not contiguous, make it so. If this mutates the string, it will invalidate any pre-existing indices.

Declaration

mutating func makeContiguousUTF8()

Discussion

Complexity: O(n) if non-contiguous, O(1) if already contiguous