CFStringCreateWithSubstring(_:_:_:)
Creates an immutable string from a segment (substring) of an existing string.
Declaration
func CFStringCreateWithSubstring(_ alloc: CFAllocator!, _ str: CFString!, _ range: CFRange) -> CFString!Parameters
- alloc:
The allocator to use to allocate memory for the new string. Pass
NULLor Kcfallocatordefault to use the current default allocator. - str:
The string from which to create the new string.
- range:
The range of characters in
strto copy. The specified range must not exceed the length of the string.
Return Value
An immutable string, or NULL if there was a problem creating the object. Ownership follows the The Create Rule.
See Also
Creating a CFString
CFStringCreateArrayBySeparatingStrings(_:_:_:)CFStringCreateByCombiningStrings(_:_:_:)CFStringCreateCopy(_:_:)CFStringCreateFromExternalRepresentation(_:_:_:)CFStringCreateWithBytes(_:_:_:_:_:)CFStringCreateWithBytesNoCopy(_:_:_:_:_:_:)CFStringCreateWithCharacters(_:_:_:)CFStringCreateWithCharactersNoCopy(_:_:_:_:)CFStringCreateWithCString(_:_:_:)CFStringCreateWithCStringNoCopy(_:_:_:_:)CFStringCreateWithFormatAndArguments(_:_:_:_:)CFStringCreateWithPascalString(_:_:_:)CFStringCreateWithPascalStringNoCopy(_:_:_:_:)