Contents

CFStringInsert(_:_:_:)

Inserts a string at a specified location in the character buffer of a CFMutableString object.

Declaration

func CFStringInsert(_ str: CFMutableString!, _ idx: CFIndex, _ insertedStr: CFString!)

Parameters

  • str:

    The string to be modified. If this value is not a CFMutableString object, an assertion is raised.

  • idx:

    The index of the character in str after which the new characters are to be inserted. If the index is out of bounds, an assertion is raised.

  • insertedStr:

    The string to insert into str.

Discussion

To accommodate the new characters, this function moves any existing characters to the right of the inserted characters the appropriate number of positions.

See Also

CFMutableString Miscellaneous Functions