added StringBuffer/Builder methods

This commit is contained in:
J. Treadwell
2008-09-22 09:31:10 -06:00
parent 96c6c7f8ea
commit 8e79618392
2 changed files with 19 additions and 1 deletions

View File

@ -322,4 +322,10 @@ public class StringBuilder implements CharSequence {
public CharSequence subSequence(int start, int end) {
return substring(start, end);
}
public void setCharAt(int index, char ch) {
if(index < 0 || index >= length) throw new IndexOutOfBoundsException();
deleteCharAt(index);
insert(index, ch);
}
}