<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/StringProtocol/capitalized",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:Sy10FoundationE11capitalizedSSvp"
  },
  "title" : "capitalized"
}
-->

# capitalized

A copy of the string with each word changed to its corresponding
capitalized spelling.

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

## Discussion

This property performs the canonical (non-localized) mapping. It is
suitable for programming operations that require stable results not
depending on the current locale.

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.
Some common word delimiting punctuation isn’t considered, so this
property may not generally produce the desired results for multiword
strings. See the `getLineStart(_:end:contentsEnd:for:)` method for
additional information.

Case transformations aren’t guaranteed to be symmetrical or to produce
strings of the same lengths as the originals.

---

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)