P19872 [GeeksforGeeks] Java convert string to lowercase2313
普及-
题目描述

Given a string S. The task is to convert characters of string to lowercase.
Example 1:
Input: S = "ABCddE"
Output: "abcdde"
Explanation: A, B, C and E are converted to
a, b, c and E thus all uppercase characters
of the string converted to lowercase letter.
Example 2:
Input: S = "LMNOppQQ"
Output: "lmnoppqq"
Explanation: L, M, N, O, and Q are
converted to l, m, n, o and q thus
all uppercase characters of the
string converted to lowercase letter.
Your Task:
You dont need to read input or print anything. Complete the function toLower() which takes S as input parameter and returns the converted string.
Expected Time Complexity:O(n)
Expected Auxiliary Space: O(1)
Constraints:
1 <= |S| <= 1000
Input only contains lowercase/uppercase English alphabets.

输入格式

见题面

输出格式

见题面

样例输入
S = "ABCddE"
样例输出
"abcdde"