java.lang
Class StringBuilder
java.lang.Object
java.lang.StringBuilder
public class StringBuilder
- 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
StringBuilder
public StringBuilder()
StringBuilder
public StringBuilder(String aString)
StringBuilder
public StringBuilder(int length)
ensureCapacity
public void ensureCapacity(int minCapacity)
delete
public StringBuilder delete(int start,
int end)
append
public StringBuilder append(String s)
append
public StringBuilder append(Object aObject)
append
public StringBuilder append(boolean aBoolean)
append
public StringBuilder append(char aChar)
append
public StringBuilder append(int i)
append
public StringBuilder append(long aLong)
append
public StringBuilder append(float aFloat)
append
public StringBuilder 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 StringBuilder in the form of an array of characters.
substring
public String substring(int start)
substring
public String substring(int start,
int end)