CFShowStr |
||||
Header: | CFString.h | Carbon status: | Supported | |
Prints the attributes of a CFString object.
void CFShowStr ( CFStringRef str );
A reference to a CFString object whose attributes you want to know more about.
You use the CFShowStr function to learn about specific attributes of a CFString object. These attributes include its:
Length (in Unicode characters)
Whether originally it was an 8-bit string and, if so, whether it was a C (HasNullByte) or Pascal (HasLengthByte) string
Whether it is a mutable or an immutable object
The allocator used to create it
The memory address of the character contents and whether those contents are in-line
The information provided by this function is for debugging purposes only. The values of any of these attributes might change between different releases and on different platforms.
You can use CFShowStr in one of two general ways. If your debugger supports function calls (such as gdb does), call CFShowStr in the debugger:
(gdb) call CFShowStr(string)You can also incorporate calls to CFShowStr in a test version of your code to print descriptions of CFString objects to the console.Length 11
IsEightBit 1
HasLengthBylte 1
HasNullByte 1
InlineContents 1
Allocator SystemDefault
Mutable 0
Contents 0x4e7c0
$2 = 17
$1 = 0
(gdb)
Supported in Carbon. Available in Carbon 1.0.2 and later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)