CFStringInitInlineBufferHeader: CFString.h

Initializes an in-line buffer to use for efficient access of a CFString's characters.

void CFStringInitInlineBuffer (
    CFStringRef str, 
    CFStringInlineBuffer *buf, 
    CFRange range
);
str

Pass a reference to the CFString object whose characters will be copied to the in-line buffer.

buf

Pass a pointer to an (uninitialized) CFStringInlineBuffer structure. On return, the pointer points to an initialized structure that can be used in a CFStringGetCharacterInInlineBuffer function call. Typically this buffer is allocated on the stack.

range

Pass a structure of type CFRange that specifies the range of characters in the CFString object str that are to be copied to the in-line buffer.

DISCUSSION

The CFStringInitInlineBuffer function initializes an CFStringInlineBuffer structure that can be used for accessing the characters of a CFString object. Once the buffer is initialized you can call the CFStringGetCharacterFromInlineBuffer function to access the characters in the buffer one at a time. The in-line buffer functions, along with the CFStringInlineBuffer structure, give you fast access to the characters of a CFString object. The technique for in-line buffer access combines the convenience of one-at-a-time character access with the efficiency of bulk access.


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