Méthode | 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.
|
Méthode | 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. | |
Résultat | void |
public Append ( string s ) : void | ||
s | string | The string to append. |
Résultat | void |
public CharBuffer ( int capacity ) : System | ||
capacity | int | |
Résultat | System |
protected CheckCapacity ( int requestedLength ) : void | ||
requestedLength | int | |
Résultat | void |
protected Grow ( int requestedLen ) : void | ||
requestedLen | int | The new requested length. |
Résultat | void |
public Remove ( int i ) : void | ||
i | int | The index of the character to remove. |
Résultat | 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. |
Résultat | 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. |
Résultat | void |