lower()
Published Oct 3, 2023Updated May 15, 2024
Contribute to Docs
The string.lower()
function receives a string and returns a transformed copy with all uppercase letters changed to lowercase, and all other characters unchanged. Uppercase characters are defined by the current locale.
Syntax
string.lower( s )
Where s
is a string.
Returns a copy of s
with letters that are uppercase in the current locale converted to lowercase. The string s
is unmodified.
Example
The code below demonstrates a basic implementation of the string.lower()
function.
stringvar = string.lower("HOw Now Brown CoW?")print(stringvar)
This will result in the following output:
how now brown cow?
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.