String类所有方法[转]
方法摘要 char charAt(int index) 返回指定索引处的 char 值。 int codePointAt(int index) 返回指定索引处的字符(Unicode 代码点)。 int codePointBefore(int index) 返回指定索引之前的字符(Unicode 代码点)。 int codePointCount(int beginIndex, int endIndex) 返回此 String 的指定文本范围中的 Unicode 代码点数。 int compareTo(String anotherString) 按字典顺序比较两个字符串。 int compareToIgnoreCase(String str) 不考虑大小写,按字典顺序比较两个字符串。 String concat(String str) 将指定字符串联到此字符串的结尾。 boolean contains(CharSequence s) 当且仅当此字符串包含 char 值的指定序列时,才返回 true。 boolean contentEquals(CharSequence cs) 当且仅当此 String 表示与指定序列相同的 char 值时,才返回 true。 boolean contentEquals(StringBuffer sb) 当且仅当此 String 表示与指定的 StringBuffer 相同的字符序列时,才返回 true。 static String copyValueOf(char[] data) 返回指定数组中表示该字符序列的字符串。 static String copyValueOf(char[] data, int offset, int count) 返回指定数组中表示该字符序列的字符串。 boolean endsWith(String suffix) 测试此字符串是否以指定的后缀结束。 boolean equals(Object anObject) 比较此字符串与指定的对象。 boolean equalsIgnoreCase(String anotherString) 将此 String 与另一个 String 进行比较,不考虑大小写。 static String |