Appends a formatted string to the character contents of a CFMutableString object.
SDKs
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Core Foundation
Declaration
void CFStringAppendFormatAndArguments(CFMutable String Ref theString, CFDictionary Ref formatOptions, CFString Ref format, va_list arguments);
Parameters
theString
The string to which the formatted characters from
format
are appended. If this value is not a CFMutableString object, an assertion is raised.formatOptions
A dictionary containing formatting options for the string (such as the thousand-separator character, which is dependent on locale). Currently, these options are an unimplemented feature.
format
A formatted string with
printf
-style specifiers.arguments
List of values to be inserted in
format
.
Discussion
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
. You can also reorder the arguments in the string by using modifiers of the form "n$" with the format specifiers (for example, %2$d
).
For more information on supported specifiers, see the relevant section in String Programming Guide for Core Foundation.