Contents

replacingCharacters(in:with:)

Returns a new string in which the characters in a specified range of the receiver are replaced by a given string.

Declaration

func replacingCharacters(in range: NSRange, with replacement: String) -> String

Parameters

  • range:

    A range of characters in the receiver.

  • replacement:

    The string with which to replace the characters in range.

Return Value

A new string in which the characters in range of the receiver are replaced by replacement.

See Also

Related Documentation

Replacing Substrings