---
title: "CFStringCreateWithFormatAndArguments(_:_:_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfstringcreatewithformatandarguments(_:_:_:_:)"
---

# CFStringCreateWithFormatAndArguments(_:_:_:_:)

Creates an immutable string from a formatted string and a variable number of arguments (specified in a parameter of type va_list).

## Declaration

```swift
func CFStringCreateWithFormatAndArguments(_ alloc: CFAllocator!, _ formatOptions: CFDictionary!, _ format: CFString!, _ arguments: CVaListPointer) -> CFString!
```

## Parameters

- `alloc`: The allocator to use to allocate memory for the new string. Pass NULL or doc://com.apple.corefoundation/documentation/CoreFoundation/kCFAllocatorDefault to use the current default allocator.
- `formatOptions`: 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.
- `format`: The formatted string with printf-style specifiers. For information on supported specifiers, see https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFStrings/formatSpecifiers.html#//apple_ref/doc/uid/TP40004265.
- `arguments`: The variable argument list of values to be inserted into the formatted string contained in format.

## Return Value

Return Value An immutable string, or NULL if there was a problem creating the object. Ownership follows the The Create Rule.

## Discussion

Discussion The programming interface for variable argument lists (va_list, va_start, va_end, and so forth) is declared in the standard C header file stdarg.h.

## See Also

### Creating a CFString

- [CFStringCreateArrayBySeparatingStrings(_:_:_:)](corefoundation/cfstringcreatearraybyseparatingstrings(_:_:_:).md)
- [CFStringCreateByCombiningStrings(_:_:_:)](corefoundation/cfstringcreatebycombiningstrings(_:_:_:).md)
- [CFStringCreateCopy(_:_:)](corefoundation/cfstringcreatecopy(_:_:).md)
- [CFStringCreateFromExternalRepresentation(_:_:_:)](corefoundation/cfstringcreatefromexternalrepresentation(_:_:_:).md)
- [CFStringCreateWithBytes(_:_:_:_:_:)](corefoundation/cfstringcreatewithbytes(_:_:_:_:_:).md)
- [CFStringCreateWithBytesNoCopy(_:_:_:_:_:_:)](corefoundation/cfstringcreatewithbytesnocopy(_:_:_:_:_:_:).md)
- [CFStringCreateWithCharacters(_:_:_:)](corefoundation/cfstringcreatewithcharacters(_:_:_:).md)
- [CFStringCreateWithCharactersNoCopy(_:_:_:_:)](corefoundation/cfstringcreatewithcharactersnocopy(_:_:_:_:).md)
- [CFStringCreateWithCString(_:_:_:)](corefoundation/cfstringcreatewithcstring(_:_:_:).md)
- [CFStringCreateWithCStringNoCopy(_:_:_:_:)](corefoundation/cfstringcreatewithcstringnocopy(_:_:_:_:).md)
- [CFStringCreateWithPascalString(_:_:_:)](corefoundation/cfstringcreatewithpascalstring(_:_:_:).md)
- [CFStringCreateWithPascalStringNoCopy(_:_:_:_:)](corefoundation/cfstringcreatewithpascalstringnocopy(_:_:_:_:).md)
- [CFStringCreateWithSubstring(_:_:_:)](corefoundation/cfstringcreatewithsubstring(_:_:_:).md)
