String java.lang.String.toLowerCase()
toLowerCase 方法返回一個字符串,該字符串中的字母被轉換爲小寫字母。
strVariable.toLowerCase( )
"String Literal".toLowerCase( )
說明 toLowerCase 方法對非字母字符不會產生影響。
下面的示例演示了 of the toLowerCase 方法的效果:
var strVariable = "This is a STRING object"; strVariable = strVariable.toLowerCase( ); 在執行上一條語句後 strVariable 的值爲:
this is a string object
toUpperCase()把字符變爲大寫