---
title: "CFNumberFormatterSetFormat(_:_:)"
framework: Core Foundation
role: symbol
role_heading: Function
path: "corefoundation/cfnumberformattersetformat(_:_:)"
---

# CFNumberFormatterSetFormat(_:_:)

Sets the format string of a number formatter.

## Declaration

```swift
func CFNumberFormatterSetFormat(_ formatter: CFNumberFormatter!, _ formatString: CFString!)
```

## Parameters

- `formatter`: The number formatter to modify.
- `formatString`: The format string to be used by formatter. See https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFDataFormatting/Articles/dfCreatingCFNumberFormatters.html#//apple_ref/doc/uid/TP40002342 for more information.

## Discussion

Discussion The format string may override other properties previously set using other functions. If this function is not called, the default value of the format string is derived from the number formatter’s style.

## See Also

### Configuring a Number Formatter

- [CFNumberFormatterSetProperty(_:_:_:)](corefoundation/cfnumberformattersetproperty(_:_:_:).md)
