---
title: "string(from:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/numberformatter/string(from:)"
---

# string(from:)

Returns a string containing the formatted value of the provided number object.

## Declaration

```swift
func string(from number: NSNumber) -> String?
```

## Parameters

- `number`: An doc://com.apple.foundation/documentation/Foundation/NSNumber object that is parsed to create the returned string object.

## Return Value

Return Value A string containing the formatted value of number using the receiver’s current settings.

## See Also

### Converting Between Numbers and Strings

- [getObjectValue(_:for:range:)](foundation/numberformatter/getobjectvalue(_:for:range:).md)
- [number(from:)](foundation/numberformatter/number(from:).md)
- [localizedString(from:number:)](foundation/numberformatter/localizedstring(from:number:).md)
