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

# CFNumberFormatterCreateStringWithNumber(_:_:_:)

Returns a string representation of the given number using the specified number formatter.

## Declaration

```swift
func CFNumberFormatterCreateStringWithNumber(_ allocator: CFAllocator!, _ formatter: CFNumberFormatter!, _ number: CFNumber!) -> CFString!
```

## Parameters

- `allocator`: The allocator to use to allocate memory for the new object. Pass NULL or doc://com.apple.corefoundation/documentation/CoreFoundation/kCFAllocatorDefault to use the current default allocator.
- `formatter`: The number formatter to use.
- `number`: The number from which to create a string representation.

## Return Value

Return Value A new string that represents the given number in the specified format. Returns NULL if there was a problem creating the string. Ownership follows the The Create Rule.

## See Also

### Formatting Values

- [CFNumberFormatterCreateNumberFromString(_:_:_:_:_:)](corefoundation/cfnumberformattercreatenumberfromstring(_:_:_:_:_:).md)
- [CFNumberFormatterCreateStringWithValue(_:_:_:_:)](corefoundation/cfnumberformattercreatestringwithvalue(_:_:_:_:).md)
- [CFNumberFormatterGetDecimalInfoForCurrencyCode(_:_:_:)](corefoundation/cfnumberformattergetdecimalinfoforcurrencycode(_:_:_:).md)
- [CFNumberFormatterGetValueFromString(_:_:_:_:_:)](corefoundation/cfnumberformattergetvaluefromstring(_:_:_:_:_:).md)
