Returns an uppercase version of the string.
SDK
- Xcode 8.0+
Framework
- Swift Standard Library
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)