String
类的api很多,简单的列举出比较常用的api。
方法名 | 方法说明 |
split | 拆分字符串 |
indexOf | 返回查询的下标 |
toUpperCase | 转换为大写 |
toLowerCase | 转换为小写 |
length | 返回字符串的长度 |
getBytes | 转换成字符数组 |
substring | 截取字符串 |
startWith | 查询前缀 |
replace | 替换字符串中的一个字符 |
endWith | 查询结尾 |
String
类的api很多,简单的列举出比较常用的api。
方法名 | 方法说明 |
split | 拆分字符串 |
indexOf | 返回查询的下标 |
toUpperCase | 转换为大写 |
toLowerCase | 转换为小写 |
length | 返回字符串的长度 |
getBytes | 转换成字符数组 |
substring | 截取字符串 |
startWith | 查询前缀 |
replace | 替换字符串中的一个字符 |
endWith | 查询结尾 |