Instance Methodswift 6.0.1Swift

uppercased

Returns an uppercase version of the string.

func uppercased() -> String

Returns

An uppercase copy of the string.

The following example transforms a string to uppercase letters:

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