java.lang
Class StringBuffer
java.lang.Object
java.lang.StringBuffer
public final class StringBuffer
- extends Object
An expandable string of characters. Actually not very expandable!
09/25/2001 added number formatting thanks to Martin E. Nielsen.
You must ensure that the buffer is large enough to take the formatted
number.
- Author:
- Martin E. Nielsen, Sven Köhler
StringBuffer
public StringBuffer()
StringBuffer
public StringBuffer(String aString)
StringBuffer
public StringBuffer(int length)
ensureCapacity
public void ensureCapacity(int minCapacity)
delete
public StringBuffer delete(int start,
int end)
append
public StringBuffer append(String s)
append
public StringBuffer append(Object aObject)
append
public StringBuffer append(boolean aBoolean)
append
public StringBuffer append(char aChar)
append
public StringBuffer append(int i)
append
public StringBuffer append(long aLong)
append
public StringBuffer append(float aFloat)
append
public StringBuffer append(double aDouble)
indexOf
public int indexOf(String str)
indexOf
public int indexOf(String str,
int fromIndex)
lastIndexOf
public int lastIndexOf(String str)
lastIndexOf
public int lastIndexOf(String str,
int fromIndex)
toString
public String toString()
- Overrides:
toString
in class Object
charAt
public char charAt(int i)
setCharAt
public void setCharAt(int i,
char ch)
length
public int length()
getChars
public char[] getChars()
- Retrieves the contents of the StringBuffer in the form of an array of characters.
substring
public String substring(int start)
substring
public String substring(int start,
int end)