Method | Description | |
---|---|---|
Append ( |
Append a string to this buffer.
|
|
Append ( char c ) : void |
Append a character to this buffer.
|
|
Append ( string s ) : void |
Append a string to this buffer.
|
|
CharBuffer ( ) : System |
Default constructor.
|
|
CharBuffer ( int capacity ) : System |
Construct with a specific capacity.
|
|
Clear ( ) : void |
Empty the buffer.
|
|
IndexOf ( char c ) : int |
Find the first instance of a character in the buffer, and return its index. This returns -1 if the character is not found.
|
|
Remove ( int i ) : void |
Remove a character at the specified index.
|
|
Remove ( int i, int n ) : void |
Remove a specified number of characters at the specified index.
|
|
SetBuffer ( char b, int len ) : void |
Overwrite this object's underlying buffer with the specified buffer.
|
|
SpeedTest ( ) : void |
Compare speed to StringBuilder.
|
|
TestSelf ( ) : bool |
Simple self test.
|
|
ToString ( ) : String |
Return the current contents as a string.
|
|
this ( int index ) : char |
Indexer.
|
Method | Description | |
---|---|---|
CheckCapacity ( int requestedLength ) : void |
Ensure that we're set for the requested length by potentially growing or shifting contents.
|
|
Grow ( int requestedLen ) : void |
Reallocate the buffer to be larger. For the new size, this uses the max of the requested length and double the current capacity. This does not shift, meaning it does not change the head or tail indices.
|
|
ShiftToZero ( ) : void |
Move the buffer contents such that headIndex becomes 0.
|
public Append ( |
||
s | The string to append. | |
return | void |
protected CheckCapacity ( int requestedLength ) : void | ||
requestedLength | int | |
return | void |
protected Grow ( int requestedLen ) : void | ||
requestedLen | int | The new requested length. |
return | void |
public Remove ( int i ) : void | ||
i | int | The index of the character to remove. |
return | void |
public Remove ( int i, int n ) : void | ||
i | int | The index of the characters to remove. |
n | int | The number of characters to remove. |
return | void |
public SetBuffer ( char b, int len ) : void | ||
b | char | The character array. |
len | int | The number of characters to consider filled /// in the input buffer. |
return | void |