Instance Method

lowercased()

Returns a lowercase version of the string.

Declaration

func lowercased() -> String

Return Value

A lowercase copy of the string.

Discussion

Here’s an example of transforming a string to all lowercase letters.

let cafe = "BBQ Café 🍵"
print(cafe.lowercased())
// Prints "bbq café 🍵"

Complexity: O(n)

Relationships

From Protocol

See Also

Changing Case

func uppercased() -> String

Returns an uppercase version of the string.