Instance Method

uppercased()

Returns an uppercase version of the string.

Declaration

func uppercased() -> String

Return Value

An uppercase copy of the string.

Discussion

The following example transforms a string to uppercase letters:

let cafe = "Café 🍵"
print(cafe.uppercased())
// Prints "CAFÉ 🍵"

Complexity: O(n)

Relationships

From Protocol

See Also

Changing Case

func lowercased() -> String

Returns a lowercase version of the string.