Methods & Description |
Method's Variants |
StringBuffer append(): appends the specified string with the given string. |
append(String str), append(boolean b) , append(double d), append(float f), append(int i), append(long lng), append(Object obj), append(StringBuffer sb), append(char c), append(char[] str), append(char[] str, int offset, int len), append(CharSequence s), append(CharSequence s, int start, int end), appendCodePoint(int codepoint). |
StringBuffer delete(): deletes the string from a given string on the basis of index number. |
delete(int startIndex, int endIndex), deleteCharAt(int index) |
StringBuffer replace(): replaces the characters or strings with the substrings in the given string. |
replace(int startIndex, int endIndex, string str) |
StringBuffer reverse(): replaces the sequence with the reverse sequence. |
--- |
StringBuffer insert(): inserts the string within a given string at the specified position. |
insert(int offset, String str), insert(int offset, Object obj), insert(int offset, boolean b), insert(int offset, char c), insert(int offset, char[] str), insert(int index, char[] str, int offset, int len), insert(int dstOffset, CharSequence s, int startIndex, endIndex), insert(int offset, double d), insert(int offset, float f), insert(int i), insert(long lng). |
int capacity(): returns the current capacity of the buffer. |
--- |
void ensureCapacity(): ensures that the current capacity is at least equal to the specified minimum capacity. |
ensureCapacity(int minimumCapacity) |
StringBuffer substring(): gets or returns the substring from the specified index number. |
substring(int startIndex), substring(int startIndex, int endIndex) |
int indexOf(): returns the index within the string of the first occurrence of the specified substring. |
indexOf(String str), indexOf(String str, int fromIndex) |
int lastIndexOf(): returns the index within the string of the last occurrence of the specified substring. |
lastIndexOf(String str), lastIndexOf(String str, int fromIndex) |
char charAt(): returns the character value at the specified index. |
charAt(int index) |
void chars(): copies the characters from the given sequence to the destination character array. |
chars(int srcBegin, int srcEnd, char[] dst, int dstBegin) |
void setCharAt(): sets the character at the specified index to ch. |
setCharAt(int index, char ch) |
void setLength(): sets the length of the character sequence. |
setLength(int newLength) |
CharSequence subsequence(): returns the new sequence that is a subsequence of the given sequence. |
CharSequence subsequence(int start, int end) |
int codePointAt(): returns the character Unicode code point at a specified index. |
codePointAt(in index) |
int codePointBefore(): returns the character Unicode code point before a specified index. |
codePointBefore(int index) |
int codePointCount(): returns the number of Unicode code points in the specified text range of the given sequence. |
codePointCount(int beginIndex, int endIndex) |
int length(): returns the length (character counts) of the string. |
--- |
int offsetByCodePoints(): returns the index within the sequence that is offset from the given index by codePointOffset code points. |
offsetByCodePoints(int index, int codePointOffset) |
void trimToSize(): reduces the storage taken by the character sequence. |
--- |
String toString(): returns the string representing the data in the given sequence. |
--- |