Function

CFStringDelete(_:_:)

Deletes a range of characters in a string.

Declaration

func CFStringDelete(_ theString: CFMutableString!, _ range: CFRange)

Parameters

theString

A string from which characters are to be deleted.

range

The range of characters in theString to delete.

Discussion

The characters after the deleted range are adjusted to “fill in” the gap.

See Also

CFMutableString Miscellaneous Functions

func CFStringAppend(CFMutableString!, CFString!)

Appends the characters of a string to those of a CFMutableString object.

func CFStringAppendCharacters(CFMutableString!, UnsafePointer<UniChar>!, CFIndex)

Appends a buffer of Unicode characters to the character contents of a CFMutableString object.

func CFStringAppendCString(CFMutableString!, UnsafePointer<Int8>!, CFStringEncoding)

Appends a C string to the character contents of a CFMutableString object.

func CFStringAppendFormatAndArguments(CFMutableString!, CFDictionary!, CFString!, CVaListPointer)

Appends a formatted string to the character contents of a CFMutableString object.

func CFStringAppendPascalString(CFMutableString!, ConstStr255Param!, CFStringEncoding)

Appends a Pascal string to the character contents of a CFMutableString object.

func CFStringCapitalize(CFMutableString!, CFLocale!)

Changes the first character in each word of a string to uppercase (if it is a lowercase alphabetical character).

func CFStringFold(CFMutableString!, CFStringCompareFlags, CFLocale!)

Folds a given string into the form specified by optional flags.

func CFStringInsert(CFMutableString!, CFIndex, CFString!)

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

func CFStringLowercase(CFMutableString!, CFLocale!)

Changes all uppercase alphabetical characters in a CFMutableString to lowercase.

func CFStringNormalize(CFMutableString!, CFStringNormalizationForm)

Normalizes the string into the specified form as described in Unicode Technical Report #15.

func CFStringPad(CFMutableString!, CFString!, CFIndex, CFIndex)

Enlarges a string, padding it with specified characters, or truncates the string.

func CFStringReplace(CFMutableString!, CFRange, CFString!)

Replaces part of the character contents of a CFMutableString object with another string.

func CFStringReplaceAll(CFMutableString!, CFString!)

Replaces all characters of a CFMutableString object with other characters.

func CFStringSetExternalCharactersNoCopy(CFMutableString!, UnsafeMutablePointer<UniChar>!, CFIndex, CFIndex)

Notifies a CFMutableString object that its external backing store of Unicode characters has changed.

func CFStringTrim(CFMutableString!, CFString!)

Trims a specified substring from the beginning and end of a CFMutableString object.

func CFStringTrimWhitespace(CFMutableString!)

Trims whitespace from the beginning and end of a CFMutableString object.

func CFStringUppercase(CFMutableString!, CFLocale!)

Changes all lowercase alphabetical characters in a CFMutableString object to uppercase.