Java toLowerCase() 方法
toLowerCase() 方法將字串轉換為小寫。
語法
public String toLowerCase() 或 public String toLowerCase(Locale locale)
參數
無
返回值
轉換為小寫的字串。
實例
public class Test { public static void main(String args[]) { String Str = new String("WWW.xuhuhu.com"); System.out.print("返回值 :" ); System.out.println( Str.toLowerCase() ); } }
以上程式執行結果為:
返回值 :www.xuhuhu.com