---
title: "string(from:style:)"
framework: contacts
role: symbol
role_heading: Type Method
path: "contacts/cncontactformatter/string(from:style:)"
---

# string(from:style:)

Returns the contact name, formatted with the specified formatter.

## Declaration

```swift
class func string(from contact: CNContact, style: CNContactFormatterStyle) -> String?
```

## Parameters

- `contact`: The contact whose name is to be formatted.
- `style`: The formatting style to be used for the contact name.

## Return Value

Return Value The formatted contact name.

## See Also

### Creating a formatted string

- [string(from:)](contacts/cncontactformatter/string(from:).md)
