CFStringCreateWithPascalStringHeader: CFString.h

Creates an immutable CFString object from a Pascal string.

CFStringRef CFStringCreateWithPascalString (
    CFAllocatorRef alloc, 
    ConstStringPtr pStr, 
    CFStringEncoding encoding
);
alloc

Pass a reference to an allocator to be used to create the CFString object or pass NULL to request the default allocator.

pStr

Pass a pointer to the Pascal string to be used to create the CFString object.

encoding

Pass an enum constant of type CFStringEncoding that specifes the encoding of the characters in the Pascal string.

function result

A reference to an immutable CFString object or NULL if there was a problem creating the object.

DISCUSSION

The CFStringCreateWithPascalString function creates an immutable CFString objects from the character contents of a Pascal string (after stripping off the initial length byte).


© 1999 Apple Computer, Inc. — (Last Updated 9/15/99)