str.length() 字符串str的长度
str1.equals(str2) 比较两个字符串是否相等,必须完全一致
str1.equalsIgnoreCase(str2) 比较两个字符串是否相等,但忽略大小写
str.charAt(index) 拿出字符串中index索引的字符
str.substring(beginIndex,endIndex) 截取从beginIndex到endIndex索引的字符串片段,但是“包头不包尾”
str.substring(beginIndex) 截取从beginIndex到末尾的字符串片段
str.replace(old,new) 用new新值替换old旧值