Instance Property

capitalizedString

A capitalized representation of the string.

Declaration

@property(readonly, copy) NSString *capitalizedString;

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:forRange:). 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 lowercaseString 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.

See Also

Changing Case

lowercaseString

A lowercase representation of the string.

localizedLowercaseString

Returns a version of the string with all letters converted to lowercase, taking into account the current locale.

- lowercaseStringWithLocale:

Returns a version of the string with all letters converted to lowercase, taking into account the specified locale.

uppercaseString

An uppercase representation of the string.

localizedUppercaseString

Returns a version of the string with all letters converted to uppercase, taking into account the current locale.

- uppercaseStringWithLocale:

Returns a version of the string with all letters converted to uppercase, taking into account the specified locale.

localizedCapitalizedString

Returns a capitalized representation of the receiver using the current locale.

- capitalizedStringWithLocale:

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