CFStringCreateWithPascalString(_:_:_:)
Creates an immutable CFString object from a Pascal string.
Declaration
func CFStringCreateWithPascalString(_ alloc: CFAllocator!, _ pStr: ConstStr255Param!, _ encoding: CFStringEncoding) -> CFString!Parameters
- alloc:
The allocator to use to allocate memory for the new string. Pass
NULLor Kcfallocatordefault to use the current default allocator. - pStr:
The Pascal string to be used to create the string.
- encoding:
The encoding of the characters in the Pascal string.
Return Value
An immutable string containing pStr, or NULL if there was a problem creating the object. Ownership follows the The Create Rule.
Discussion
This function creates an immutable CFString objects from the character contents of a Pascal string (after stripping off the initial length byte).
See Also
Creating a CFString
CFStringCreateArrayBySeparatingStrings(_:_:_:)CFStringCreateByCombiningStrings(_:_:_:)CFStringCreateCopy(_:_:)CFStringCreateFromExternalRepresentation(_:_:_:)CFStringCreateWithBytes(_:_:_:_:_:)CFStringCreateWithBytesNoCopy(_:_:_:_:_:_:)CFStringCreateWithCharacters(_:_:_:)CFStringCreateWithCharactersNoCopy(_:_:_:_:)CFStringCreateWithCString(_:_:_:)CFStringCreateWithCStringNoCopy(_:_:_:_:)CFStringCreateWithFormatAndArguments(_:_:_:_:)CFStringCreateWithPascalStringNoCopy(_:_:_:_:)CFStringCreateWithSubstring(_:_:_:)