IGLib
1.7.2
The IGLib base library for development of numerical, technical and business applications.
|
CharacterBufferInterface wrapper for StringBilder. More...
Public Member Functions | |
CharacterBuffer () | |
CharacterBuffer (String str) | |
CharacterBuffer (StringBuilder sb) | |
int | EnsureCapacity (int Capacity) |
Ensures that the buffer's current capacity is at least the specified number of bytes. More... | |
void | Delete (int startIndex, int length) |
Removes the specified section of the buffer. More... | |
void | Append (string str) |
Appends the specified string at the end of the buffer. More... | |
void | Append (char ch) |
Appends the specified character at the end of the buffer. More... | |
void | Append (char[] chArray) |
Appends the specified array of characters at the end of the buffer. More... | |
void | Append (List< char > chList) |
Inserts the specified list of characters at the end of the buffer. More... | |
void | Insert (int index, string str) |
Inserts the specified string at the specified position of the buffer. More... | |
void | Insert (int index, char ch) |
Inserts the specified character at the specified position of the buffer. More... | |
void | Insert (int index, char[] chArray) |
Inserts the specified array of characters at the specified position of the buffer. More... | |
void | Insert (int index, List< char > chList) |
Inserts the specified list of characters at the specified position of the buffer. More... | |
override string | ToString () |
Saves buffer contents to string and returns it. More... | |
void | Save (string filePath, bool append) |
Saves buffer contents to a text file. More... | |
void | Save (string filePath) |
Saves buffer contents to a text file. If the file already exists then it is overwritten. More... | |
Static Public Member Functions | |
static void | TestSpeed () |
Compares speed of pure stringBuilder adnd of CharacterBuffer. More... | |
Protected Attributes | |
StringBuilder | _str |
Properties | |
char | this[int index] [get, set] |
Character with the specified index. More... | |
int | Length [get, set] |
Current length of the buffer or object represented by the buffer. More... | |
int | Capacity [get, set] |
Buffer current capacity. More... | |
Properties inherited from IG.Lib.ICharacterBuffer | |
new char | this[int index] [get, set] |
Character with the specified index. More... | |
Properties inherited from IG.Lib.ICharacterBufferReadOnly | |
int | Length [get, set] |
Current length of the buffer or object represented by the buffer. More... | |
int | Capacity [get, set] |
Buffer current capacity. More... | |
char | this[int index] [get] |
Character with the specified index. More... | |
CharacterBufferInterface wrapper for StringBilder.
$A Igor Feb09;
|
inline |
|
inline |
|
inline |
|
inline |
Ensures that the buffer's current capacity is at least the specified number of bytes.
Capacity | Minimal capacity to be ensured. |
Implements IG.Lib.ICharacterBufferReadOnly.
|
inline |
Removes the specified section of the buffer.
startIndex | The first index of the removed text. |
length | Length of the removed section (number of characters removed). |
Implements IG.Lib.ICharacterBuffer.
|
inline |
Appends the specified string at the end of the buffer.
Implements IG.Lib.ICharacterBuffer.
|
inline |
Appends the specified character at the end of the buffer.
Implements IG.Lib.ICharacterBuffer.
|
inline |
Appends the specified array of characters at the end of the buffer.
Implements IG.Lib.ICharacterBuffer.
|
inline |
Inserts the specified list of characters at the end of the buffer.
chList |
Implements IG.Lib.ICharacterBuffer.
|
inline |
Inserts the specified string at the specified position of the buffer.
Implements IG.Lib.ICharacterBuffer.
|
inline |
Inserts the specified character at the specified position of the buffer.
Implements IG.Lib.ICharacterBuffer.
|
inline |
Inserts the specified array of characters at the specified position of the buffer.
Implements IG.Lib.ICharacterBuffer.
|
inline |
Inserts the specified list of characters at the specified position of the buffer.
Implements IG.Lib.ICharacterBuffer.
|
inline |
Saves buffer contents to string and returns it.
Implements IG.Lib.ICharacterBufferReadOnly.
|
inline |
Saves buffer contents to a text file.
filePath | Path of the file where buffer is stored. |
append | Whether the file is appended. If true and if the file already exists then buffer contents are appended at the end of the file. |
Implements IG.Lib.ICharacterBufferReadOnly.
|
inline |
Saves buffer contents to a text file. If the file already exists then it is overwritten.
filePath | Path of the file where buffer is stored. |
Implements IG.Lib.ICharacterBufferReadOnly.
|
inlinestatic |
Compares speed of pure stringBuilder adnd of CharacterBuffer.
References IG.Lib.CharacterBuffer.Length, IG.Lib.StopWatch1.Reset(), IG.Lib.StopWatch1.Start(), IG.Lib.StopWatch1.Stop(), and IG.Lib.StopWatch1.Time.
|
protected |
|
getset |
Character with the specified index.
|
getset |
Current length of the buffer or object represented by the buffer.
Referenced by IG.Lib.CharacterBuffer.TestSpeed().
|
getset |
Buffer current capacity.