587.Convert Uppercase Letters to Lowercase
Easy
Given a string
text, return a copy in which every uppercase letter A–Z is replaced by its lowercase version. All other characters stay the same.
It is the mirror of upper-casing — add 32 instead of subtracting it. Converting to one case is called case normalisationCase NormalisationConverting text to a single case so that comparisons and searches ignore capitalisation. and is everywhere in practice: usernames, email addresses and search terms are usually lower-cased before they are compared.
Example 1:
Input: text = "Hello, WORLD 2!"
Output: "hello, world 2!"
Example 2:
Input: text = "ABC"
Output: "abc"
+ 4 hidden test cases run on Submit.
Constraints:
- ●
1 ≤ text.length ≤ 200 - ●
text contains printable ASCII characters
text =
Hello, WORLD 2!