---
title: "capitalized(with:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/stringprotocol/capitalized(with:)"
---

# capitalized(with:)

Returns a capitalized representation of the string using the specified locale.

## Declaration

```swift
func capitalized(with locale: Locale?) -> String
```
