Method Summary
1 Char
charAt(int index)
Returned at the specified index.charValue.
index-charThe index of the value.
2 string
concat(String str)
Connects the specified string to the end of this string.
str-Connect to thisStringEnd ofString。
substring(int beginIndex)
Returns a new string that is a substring of this string.
beginIndex-Start index (included).
3 Boolean
endsWith(String suffix)
Tests whether this string ends with the specified suffix.
suffixSuffix
startsWith(String prefix)
Tests whether this string starts with the specified prefix.
equals(Object anObject)
Compares this string to the specified object.
anObject-With thisStringObjects to compare with
equalsIgnoreCase(String anotherString)
Add thisStringwith anotherStringComparisons, regardless of case.
anotherString-With thisStringTo compare theString。
4 int
indexOf(int ch)
Returns the index at which the specified character first appears in this string.
ch-One character
indexOf(int ch, int fromIndex)
Returns the index at the first occurrence of the specified character in this string, starting the search from the specified index.
ch-One characterfromIndex-the index at which to start the search.
indexOf(String str)
Returns the index at which the specified substring first appears in this string.
str-arbitrary string
indexOf(String str, int fromIndex)
Returns the index of the first occurrence of the specified substring in this string, starting at the specified index.
str-substring to search for.fromIndex-The index location at which to start the search.
public intlastIndexOf(int ch)
public intlastIndexOf(iint ch, int fromIndex)
public intlastIndexOf(String str)
public intlastIndexOf(String str, int fromIndex)
length()
Returns the length of this string.
To be continued .....
Java.lang class String