<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/PersonNameComponents/formatted()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation20PersonNameComponentsV9formattedSSyF"
  },
  "title" : "formatted()"
}
-->

# formatted()

Generates a locale-aware string representation of an instance of person name components using the default format style.

```
func formatted() -> String
```

## Return Value

A string, formatted according to the default style.

## Discussion

The [`formatted()`](/documentation/Foundation/PersonNameComponents/formatted()) method creates a string representation of a person’s name suitable for most uses.

```swift
var tlc = PersonNameComponents()
tlc.familyName = "Clark"
tlc.givenName = "Thomas"
tlc.middleName = "Louis"
tlc.namePrefix = "Dr."
tlc.nickname = "Tom"
tlc.nameSuffix = "Esq."

tlc.formatted()
// Thomas Clark
```

If you want more control over the length and formatting of the name string, consider using the [`formatted(_:)`](/documentation/Foundation/PersonNameComponents/formatted(_:)) method and including a format style.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)