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

# string(from:)

Returns a string formatted for a given NSPersonNameComponents object.

## Declaration

```swift
func string(from components: PersonNameComponents) -> String
```

## Parameters

- `components`: The name components to be formatted.

## Return Value

Return Value A formatted string representation of the given name components.

## See Also

### Converting Between Person Name Components and Strings

- [localizedString(from:style:options:)](foundation/personnamecomponentsformatter/localizedstring(from:style:options:).md)
- [annotatedString(from:)](foundation/personnamecomponentsformatter/annotatedstring(from:).md)
- [personNameComponents(from:)](foundation/personnamecomponentsformatter/personnamecomponents(from:).md)
- [getObjectValue(_:for:errorDescription:)](foundation/personnamecomponentsformatter/getobjectvalue(_:for:errordescription:).md)
