A:判断功能
boolean equals(Object obj)//比较字符串内容是否相等
boolean equalsIgnoreCase(String str)//比较字符串内容是否相等
boolean contains(String str)//大串中是否包含小串
boolean startsWith(String str)//判断字符串是否已给定的字符串开头
boolean endsWith(String str)//判断字符串是否以给定的字符串结尾
boolean isEmpty()//判断字符串是否为空
B:获取功能
int length()//获取字符串长度
char charAt(int index)//指定索引处的字符
int indexOf(int ch)//指定字符在字符串的索引
int indexOf(String str)//指定字符串在字符串中的索引
int indexOf(int ch,int fromIndex)//返回指定字符从指定索引开始出现的位置
int indexOf(String str,int fromIndex)
String substring(int start)//从指定索引开始截取字符串到结束
String substring(int start,int end)//指定开始索引和结束索引截取字符串
C:转换功能
byte[] getBytes()//字符串转化字节数组
char[] toCharArray()//字符串转换成字符数组
static String valueOf(char[] chs)//字符数组转换为字符串
static String valueOf(int i)//int值转换为字符串
String toLowerCase()//字符串转换为小写
String toUpperCase()//字符串转换为大写
String concat(String str)//与指定字符串拼接
D:其他功能
a:替换功能
String replace(char old,char new)//新字符代替旧字符
String replace(String old,String new)//新字符串代替旧字符串
b:去空格功能
String trim()//去除开头结尾的空格
c:按字典比较功能
int compareTo(String str)
int compareToIgnoreCase(String str)