---
title: "format(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/listformatstyle/format(_:)"
---

# format(_:)

Creates a locale-aware string representation of the value.

## Declaration

```swift
func format(_ value: Base) -> String
```

## Parameters

- `value`: The sequence of elements to format.

## Return Value

Return Value A string representation of the provided sequence.

## Discussion

Discussion The format(_:) instance method generates a string from the provided sequence. Once you create a style, you can use it to format similar sequences multiple times. For example: let percentStyle = ListFormatStyle<IntegerFormatStyle.Percent, [Int]>(memberStyle: .percent) percentStyle.format([92, 98]) // 92% and 98% percentStyle.format([67, 72, 99]) // 67%, 72%, and 99%
