Instance Property

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

Related Symbols

func lowercased(with: Locale?)

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

var localizedLowercase: String

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