How to convert a string to lowercase letters

You can convert any string to lowercase – that is, going from "HELLO" to "hello" – by calling its lowercased() method, like this:

let str = "Sunday, Monday, Happy Days"
print(str.lowercased())

That will output "sunday, monday, happy days" to the Xcode console.

Sponsored You’re already busy updating your app for Swift 4.2 and iOS 12, so why not let Instabug help you find and fix bugs? Add just two lines of code to your project and receive comprehensive reports with all the feedback you need to ship a world-class app – click here to learn more!