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
strafter 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
CFStringAppend(_:_:)CFStringAppendCharacters(_:_:_:)CFStringAppendCString(_:_:_:)CFStringAppendFormatAndArguments(_:_:_:_:)CFStringAppendPascalString(_:_:_:)CFStringCapitalize(_:_:)CFStringCreateMutable(_:_:)CFStringCreateMutableCopy(_:_:_:)CFStringCreateMutableWithExternalCharactersNoCopy(_:_:_:_:_:)CFStringDelete(_:_:)CFStringFindAndReplace(_:_:_:_:_:)CFStringFold(_:_:_:)CFStringLowercase(_:_:)CFStringNormalize(_:_:)CFStringPad(_:_:_:_:)