---
title: capitalized
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsstring/capitalized
---

# capitalized

A capitalized representation of the string.

## Declaration

```swift
var capitalized: String { get }
```

## Discussion

Discussion A capitalized string is a string with the first character in each word changed to its corresponding uppercase value, and all remaining characters set to their corresponding lowercase values. A word is any sequence of characters delimited by spaces, tabs, or line terminators (listed under getLineStart(_:end:contentsEnd:for:)). Some common word delimiting punctuation isn’t considered, so this property may not generally produce the desired results for multiword strings. Case transformations aren’t guaranteed to be symmetrical or to produce strings of the same lengths as the originals. See lowercased for an example. This property performs the canonical (non-localized) mapping. It is suitable for programming operations that require stable results not depending on the current locale. important: When working with text that’s presented to the user, use localizedCapitalized or capitalized(with:) instead.

## See Also

### Changing Case

- [lowercased](foundation/nsstring/lowercased.md)
- [localizedLowercase](foundation/nsstring/localizedlowercase.md)
- [lowercased(with:)](foundation/nsstring/lowercased(with:).md)
- [uppercased](foundation/nsstring/uppercased.md)
- [localizedUppercase](foundation/nsstring/localizeduppercase.md)
- [uppercased(with:)](foundation/nsstring/uppercased(with:).md)
- [localizedCapitalized](foundation/nsstring/localizedcapitalized.md)
- [capitalized(with:)](foundation/nsstring/capitalized(with:).md)
