Java String toLowerCase() 方法
示例
將字串轉換為大寫和小寫字母
String txt = "Hello World";
System.out.println(txt.toUpperCase());
System.out.println(txt.toLowerCase());
定義和用法
toLowerCase()
方法將字串轉換為小寫字母。
注意:toUpperCase() 方法將字串轉換為大寫字母。
語法
public String toLowerCase()
引數
無。
技術詳情
返回 | 一個 String 值,表示轉換為小寫的新字串。 |
---|
❮ String Methods