【原題目】:
Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase.
Example 1:
Input: "Hello" Output: "hello"
Example 2:
Input: "here" Output: "here"
Example 3:
Input: "LOVELY" Output: "lovely"
參考 : https://leetcode.com/problems/to-lower-case/
【My Solution】:
【學習重點】
1. Java 的 String 提供轉大寫及小寫的方法使用
String |
toLowerCase()
Converts all of the characters in this
String to lower case using the rules of the default locale. |
String |
toUpperCase()
Converts all of the characters in this
String to upper case using the rules of the default locale. |
文章標籤
全站熱搜