CFStringAppendFormat |
||||
Header: | CFString.h | Carbon status: | Supported | |
Appends a formatted string to the character contents of a mutable CFString object.
void CFStringAppendFormat ( CFMutableStringRef theString, CFDictionaryRef formatOptions, CFStringRef format, ... );
A reference to a mutable CFString object to which the characters of the formatted string are to be appended. If theString is not a mutable CFString object an assertion is raised.
Pass a reference to a CFDictionary object containing formatting options for the string (such as the thousand-separator character, which is dependent on locale). Currently, these options are an unimplemented feature.
Pass a reference to a CFString object that contains a string with printf-style specifiers.
The CFStringAppendFormat appends to the character contents of a CFString object a formatted string into which a variable list of parameter values are inserted. A formatted string is one with printf-style format specifiers embedded in the text such as %d (decimal), %f (double), and %@ (Core Foundation object). The subsequent arguments, in order, are substituted for the specifiers in the character data appended to the CFString object. You can also reorder the arguments in the string by using modifiers of the form"$n" with the format specifiers (for example, %$2d. These modifiers allow you to easily localize formatted strings by reading them from resources or property-list files.
For more information on supported specifiers, see the relevant section in "Core Foundation String Services Tasks."
Supported in Carbon. Available in Carbon 1.0.2 and later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)