4种方法
- toLocaleUpperCase ()
作用 | 用法 | 说明 |
将字符转换为大写 | stringVar.tolocaleUpperCase( ) | 必选的 stringVar 引用是一个 String 对象,值或文字 |
- toUpperCase()
作用 | 用法 | 说明 |
返回一个字符串,该字符串中的所有字母都被转化为大写字母 | strVariable.toUpperCase( ) | toUpperCase 方法对非字母字符不会产生影响 |
- toLocaleLowerCase()
作用 | 用法 | 说明 |
将字符转换为小写 | stringVar.tolocaleLowerCase( ) | 必选的 stringVar 引用是一个 String 对象,值或文字 |
- toLowerCase()
作用 | 用法 | 说明 |
返回一个字符串,该字符串中的字母被转换为小写字母 | strVariable.toLowerCase( ) | toLowerCase 方法对非字母字符不会产生影响 |