Contents

lowercased

A lowercase representation of the string.

Declaration

var lowercased: 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.

Case transformations aren’t guaranteed to be symmetrical or to produce strings of the same lengths as the originals. That is, the result of this statement:

lcString = [myString lowercaseString];

…might not be equal to this statement:

lcString = [[myString uppercaseString] lowercaseString];

For example, the uppercase form of “ß” in German is “SS”, so converting “Straße” to uppercase, then lowercase, produces this sequence of strings:

  • “Straße”

  • “STRASSE”

  • “strasse”

See Also

Changing Case