public class IStringBuffer extends Object
| Constructor and Description |
|---|
IStringBuffer()
create a buffer with a default length 16
|
IStringBuffer(int length)
create a buffer with a specified length
|
IStringBuffer(String str)
create a buffer with a specified string
|
| Modifier and Type | Method and Description |
|---|---|
IStringBuffer |
append(boolean bool)
append a boolean value
|
IStringBuffer |
append(char c)
append a char to the buffer
|
IStringBuffer |
append(char[] chars)
append some chars to the buffer
|
IStringBuffer |
append(char[] chars,
int start)
append the rest of the chars to the buffer
|
IStringBuffer |
append(char[] chars,
int start,
int length)
append parts of the chars to the buffer
|
IStringBuffer |
append(double doublev)
append a double value
|
IStringBuffer |
append(float floatv)
append a float value
|
IStringBuffer |
append(int intv)
append a int value
|
IStringBuffer |
append(long longv)
append a long value
|
IStringBuffer |
append(short shortv)
append a short value
|
IStringBuffer |
append(String str)
append a string to the buffer
|
char[] |
buffer()
return the chars of the buffer
|
char |
charAt(int idx)
get the char at a specified position in the buffer
|
IStringBuffer |
clear()
clear the buffer by reset the count to 0
|
IStringBuffer |
deleteCharAt(int idx)
delete the char at the specified position
|
char |
first()
always return the first char
|
char |
last()
always return the last char
|
int |
length()
return the length of the buffer
|
void |
set(int idx,
char chr)
set the char at the specified index
|
String |
toString()
return the string of the current buffer
|
public IStringBuffer()
public IStringBuffer(int length)
length - public IStringBuffer(String str)
str - public IStringBuffer append(String str)
str - string to append topublic IStringBuffer append(char[] chars, int start, int length)
chars - start - the start indexlength - length of chars to append topublic IStringBuffer append(char[] chars, int start)
chars - start - the start indexpublic IStringBuffer append(char[] chars)
chars - public IStringBuffer append(char c)
c - the char to append topublic IStringBuffer append(boolean bool)
bool - public IStringBuffer append(short shortv)
shortv - public IStringBuffer append(int intv)
intv - public IStringBuffer append(long longv)
longv - public IStringBuffer append(float floatv)
doublev - public IStringBuffer append(double doublev)
doublev - public int length()
public char charAt(int idx)
public char last()
public char first()
public IStringBuffer deleteCharAt(int idx)
public void set(int idx,
char chr)
idx - chr - public char[] buffer()
public IStringBuffer clear()
public String toString()
toString in class ObjectObject.toString()Copyright © 2017. All Rights Reserved.