![]() ![]() ![]() ![]() |
| Topics this page:
|
|
|
Return DataType ![]() | Method | Parameter List | Description |
---|---|---|---|
int | length() | str | Returns the length (character count) of this string buffer |
char | charAt() | int location_index | Extract a single character. char charAt(int index); |
String | substring() | int startIndex, int endIndex | Return the substring from the starting index up to but not including the ending index. |
String | substring() | int start | Returns a new string that contains a sub-sequence of characters currently contained in this StringBuffer The sub-string begins at the specified index and extends to the end of the StringBuffer |
String | substring() | int start, int end | Returns a new string that contains a sub-sequence of characters currently contained in this StringBuffer |
|
Return DataType ![]() | Method | Parameter List | Description |
---|---|---|---|
boolean | endsWith() | String string_to_match | Determines if the string ends with the string_to_match. |
int | indexOf() | String sub_string | Determines location of first occurence of substring. You get a-1 if it does not exist. |
int | lastIndexOf() | String sub_string | Determines location of last occurrence of substring. You get a-1 if it does not exist. |
String | replace() | char originalChar, char replacementChar | Replaces an existing character with another. |
boolean | startsWith() | String, string_to_match | Determines if the string starts with the string_to_match. |
String | concat() | String str | Concatenate the specified string to the end of this string |
String | toLowerCase() | None | Converts the string to lowercase. |
String | None | Converts the string to uppercase. | |
String | trim() | None | Removes leading and trailing spaces. |
String | compareTo() | String, string_to_match | compares two strings lexicographically |
String | compareToIgnoreCase() | String, string_to_match | compares two strings lexicographically, ignoring case considerations |
|
Return DataType | Method | Parameter List | Description |
---|---|---|---|
int | capacity() | . | Returns the current capacity of the string buffer |
void | setLength() | int, newLength | Sets the length of this string buffer |
StringBuffer | append() | String str | Appends the string to this string buffer |
StringBuffer | delete() | int start, int end | Removes the characters in a sub-string of this StringBuffer |
StringBuffer | deleteCharAt() | int index | Removes the character at the specified position in this StringBuffer (shortening the StringBuffer by one character) |
StringBuffer | insert() | int offset, String str | Inserts the string into this string buffer |
StringBuffer | reverse() | None | The character sequence contained in this string buffer is replaced by the reverse of the sequence |
Related Topics:
![]()
| Your first name: Your family name: Your location (city, country): Your Email address: |
Top of Page ![]() Thank you! |