0709. To Lower Case (E)

To Lower Case (E)

题目

Given a string s, return the string after replacing every uppercase letter with the same lowercase letter.

Example 1:

Input: s = "Hello"
Output: "hello"

Example 2:

Input: s = "here"
Output: "here"

Example 3:

Input: s = "LOVELY"
Output: "lovely"

Constraints:

  • 1 <= s.length <= 100
  • s consists of printable ASCII characters.

题意

将字符串转化为全小写。

思路

直接干。


代码实现

Java

class Solution {
    public String toLowerCase(String s) {
        return s.toLowerCase();
    }
}
上一篇:家庭作业:有一篇文章,三行,每行八十个字符,输出其中大小写等其他字符


下一篇:Docker安装MySQL忽略大小写问题的问题