char charAt(int idex); //得到第inde个位置上的字符
int compareTo(String other); //按照字典顺序,如果当前对象位于other之前,返回正数;若相等返回0;若在之后,则返回一个负数。
new String(int[] codePoints, int offset, int count); //用数组codePoints中从offset开始的count个元素构造一个字符串
boolean empty(); boolean blank(); //若当前字符串为空或由空格组成,则返回true,否则返回false
boolean equals(Object other); //如果当前字符串与other相等,则返回true
boolean equalsIgnoreCase(Object other); //如果当前字符串与other相等,则返回true boolean startsWith(String other); //当前字符串以other开头,则返回true
boolean endsWith(String other); //当前字符串以other结尾,则返回true
int indexOf(String str); //获取当前字符串中,str第一次开始的位置 int
indexOf(String str, int fromIndex); //从下标fromIndex开始匹配,str在当前字符串第一次出现的位置
int lastIndexOf(String str); //获取当前字符串中,str最后出现的位置
int lastIndexOf(String str, int fromIndex); //获取当前字符串中,从第fromIndex个元素开始,str最后出现的下标
int length(); //获取当前字符串长度
int codePointCount(int startIndex, int endIndex); //获取从第startIndex开始,到第endIndex-1的元素个数
String substring(int beginIndex); //截取当前字符串,从第beginIndex个字符开始到末尾结束 String substring(int beginIndex, int endIndex); //截取当前字符串,从第beginIndex个字符开始到第endIndex-1个字符结束
String toLowerCase(); //将当前字符串转换为小写并返回
String toUpperCase(); //将当前字符串转换为大写并返回
String trim(); //去掉当前字符串中首尾的空格,并返回
String repeat(int count); //将当前字符串重复count次,并返回