---
title: numberFormatter
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/lengthformatter/numberformatter
---

# numberFormatter

The number formatter used to format the numbers in length strings.

## Declaration

```swift
@NSCopying var numberFormatter: NumberFormatter! { get set }
```

## Discussion

Discussion This property defaults to a number formatter using the NumberFormatter.Style.decimal. You can provide a different number formatter to customize the length string’s appearance.

## See Also

### Formatting Length Strings

- [isForPersonHeightUse](foundation/lengthformatter/isforpersonheightuse.md)
- [getObjectValue(_:for:errorDescription:)](foundation/lengthformatter/getobjectvalue(_:for:errordescription:).md)
- [string(fromMeters:)](foundation/lengthformatter/string(frommeters:).md)
- [string(fromValue:unit:)](foundation/lengthformatter/string(fromvalue:unit:).md)
- [unitString(fromMeters:usedUnit:)](foundation/lengthformatter/unitstring(frommeters:usedunit:).md)
- [unitString(fromValue:unit:)](foundation/lengthformatter/unitstring(fromvalue:unit:).md)
- [unitStyle](foundation/lengthformatter/unitstyle.md)
