S.N. |
方法 & 描述 |
---|
1 |
char charAt(int index)
此方法返回指定索引處的char值. |
2 |
int codePointAt(int index)
此方法返回指定索引處的字符(Unicode代碼點). |
3 |
int codePointBefore(int index)
此方法返回指定索引之前的字符(Unicode代碼點). |
4 |
int codePointCount(int beginIndex, int endIndex)
此方法返回在此字符串指定的文本範圍的Unicode代碼點. |
5 |
int compareTo(String anotherString)
這種方法比較兩個字符串字典. |
6 |
int compareToIgnoreCase(String str)
這種方法比較兩個字符串,字典,忽略大小寫差異. |
7 |
String concat(String str)
這種方法連接指定的字符串,該字符串的結束. |
8 |
boolean contains(CharSequence s)
這的方法ceturns真正的當且僅當此字符串包含指定的char值序列. |
9 |
boolean contentEquals(CharSequence cs)
這種方法比較字符串指定的CharSequence. |
10 |
boolean contentEquals(StringBuffer sb)
這種方法比較字符串到指定的StringBuffer. |
11 |
static String copyValueOf(char[] data)
此方法返回一個字符串,它表示的字符序列中指定數組. |
12 |
static String copyValueOf(char[] data, int offset, int
count)
此方法返回一個字符串,它表示的字符序列中指定數組. |
13 |
boolean endsWith(String suffix)
此方法測試此字符串是否以指定後綴結束. |
14 |
boolean equals(Object anObject)
這種方法比較字符串到指定的對象. |
15 |
boolean equalsIgnoreCase(String anotherString)
這種方法比較字符串到另一個字符串,忽略大小寫的情況考慮因素. |
16 |
static String format(Locale l, String format, Object... args)
這種方法使用指定的語言環境,格式字符串和參數返回一個格式化字符串. |
17 |
static String format(String format, Object... args)
這種方法使用指定的格式字符串和參數返回一個格式化字符串. |
18 |
byte[] getBytes()
這個方法編碼字符串到一個使用平臺的默認字符集的字節序列,並將結果存儲到一個新的字節數組. |
19 |
byte[] getBytes(Charset charset)
這個方法編碼字符串轉換成一個使用給定字符集的字節序列,並將結果存儲到一個新的字節數組. |
20 |
byte[] getBytes(String charsetName)
這個方法編碼字符串轉換成使用指定的字符集的字節序列,並將結果存儲到一個新的字節數組. |
21 |
void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
這種方法從這個字符串中的字符複製到目標字符數組. |
22 |
int hashCode()
此方法返回該字符串的哈希碼. |
23 |
int indexOf(int ch)
此方法返回在此字符串中第一次出現的指定字符索引. |
24 |
int indexOf(int ch, int fromIndex)
此方法返回索引指定的字符在此字符串中第一次出現,在指定的索引開始搜索. |
25 |
int indexOf(String str)
此方法返回在此字符串中第一次出現的指定子指數. |
26 |
int indexOf(String str, int fromIndex)
此方法返回指數在此字符串中第一次出現的指定子,開始在指定的索引. |
27 |
String intern()
該方法返回一個字符串對象的規範表示. |
28 |
boolean isEmpty()
此方法返回true,當且僅當length() 爲 0. |
29 |
int lastIndexOf(int ch)
此方法返回在此字符串中最後一次出現的指定字符索引. |
30 |
int lastIndexOf(int ch, int fromIndex)
此方法返回的索引,搜索指定的字符在此字符串中最後一次出現在指定的索引開始向後. |
31 |
int lastIndexOf(String str)
此方法返回的最右邊出現的指定子字符串在此指數. |
32 |
int lastIndexOf(String str, int fromIndex)
此方法返回在此字符串中最後一次出現的指定子索引,搜索在指定的索引開始向後. |
33 |
int length()
此方法返回此字符串的長度. |
34 |
boolean matches(String regex)
這個方法告訴這個字符串是否匹配給定的正則表達式. |
35 |
int offsetByCodePoints(int index, int codePointOffset)
此方法返回在此字符串中的偏離給定的索引codePointOffset代碼點指數. |
36 |
boolean regionMatches(boolean ignoreCase, int
toffset, String other, int ooffset, int len)
這種方法的測試,兩個字符串區域是否相等的情況下忽略. |
37 |
boolean regionMatches(int toffset, String other, int ooffset,
int len)
該方法測試兩個string區域是否是相等. |
38 |
String replace(char oldChar, char newChar)
此方法返回一個新的字符串替換此字符串中出現的所有oldChar與newChar. |
39 |
String replace(CharSequence target, CharSequence replacement)
此方法替換每個子字符串,該字符串指定的文字替換序列相匹配的文字靶序列. |
40 |
String replaceAll(String regex, String replacement)
該方法與給定的替換此字符串匹配給定的正則表達式替換每個子. |
41 |
String replaceFirst(String regex, String replacement)
該方法與給定的替換,替換第一個給定的正則表達式的字符串相匹配的子串. |
42 |
String[] split(String regex)
該方法拆分給定的正則表達式匹配的串在一起圍. |
43 |
String[] split(String regex, int limit)
該方法拆分給定的正則表達式匹配的串在一起圍. |
44 |
boolean startsWith(String prefix)
該方法的測試,如果這個字符串用指定的前綴開始. |
45 |
boolean startsWith(String prefix, int toffset)
該方法的測試,如果在指定的索引開始的子字符串,該字符串開始用指定的前綴. |
46 |
CharSequence subSequence(int beginIndex, int endIndex)
此方法返回一個新的字符序列,這個序列的一個子. |
47 |
String substring(int beginIndex)
該方法返回一個新的字符串,這個字符串的子串. |
48 |
String substring(int beginIndex, int endIndex)
該方法返回一個新的字符串,這個字符串的子串. |
49 |
char[] toCharArray()
此方法轉換字符串到一個新的字符數組. |
50 |
String toLowerCase()
此方法轉換所有的字符在此字符串中使用的默認語言環境的規則,以小寫的情況下. |
51 |
String toLowerCase(Locale locale)
此方法轉換所有使用給定的Locale的規則,在此字符串中的字符小寫. |
52 |
String toString()
此方法返回的字符串本身. |
53 |
String toUpperCase()
該方法將在此字符串中的所有字符爲大寫使用的默認語言環境的規則. |
54 |
String toUpperCase(Locale locale)
該方法將在此字符串中的所有字符爲大寫的規則給定的Locale. |
55 |
String trim()
該方法返回一個字符串的副本,開頭和結尾的空格省略. |
56 |
static String valueOf(boolean b)
此方法返回的布爾型參數的字符串表示形式. |
57 |
static String valueOf(char c)
此方法返回的char參數的字符串表示形式. |
58 |
static String valueOf(char[] data)
此方法返回char數組參數的字符串表示形式. |
59 |
static String valueOf(char[] data, int offset,
int count)
此方法返回一個特定的子數組的char數組參數的字符串表示形式. |
60 |
static String valueOf(double d)
此方法返回的字符串表示形式的double參數. |
61 |
static String valueOf(float f)
此方法返回float參數的字符串表示形式. |
62 |
static String valueOf(int i)
此方法返回int參數的字符串表示形式. |
63 |
static String valueOf(long l)
此方法返回long參數的字符串表示形式. |
64 |
static String valueOf(Object obj)
此方法返回一個對象參數的字符串表示形式. |