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