105 buf =
new char[size];
118 unsigned int tempsize =
cursize;
136 unsigned int offset = (
unsigned int)(
ptr -
buf);
137 char* temp =
new char[
cursize];
148 if (
cursize < blocksize * blocks)
158 unsigned int tptr = (
unsigned int)(
ptr -
buf);
159 char* temp =
new char[blocksize * blocks];
178 if (i ==
nullptr ||
buf ==
ptr)
184 if (*i !=
' ' && *i !=
'\t' && *i !=
'\r' && *i !=
'\n')
203 if (i ==
nullptr ||
buf ==
ptr)
240 while ((*
ptr++ = *s++));
257 unsigned int n = count;
265 while ((*
ptr++ = *source++));
288 int len =
StrLen(string
) *
sizeof(
char);
void Append(const char c)
bool RemoveTrailing(const char c)
CharBuffer(unsigned int size)
Initialize while allocating specified amount of memory.
bool Is(const char *string) const
Compare content of CharBuffer with string)
void ClearBuffer()
Release memory in buffer.
bool RemoveTrailing(const char *string)
void Append(const char *source)
CharBuffer()
Initialize without allocating memory.
bool StrIsEqual(const char *s1, const char *s2)
Compare two null terminated strings to each other.
void EnsureGrowth(unsigned int size)
int StrLen(const char *string)
Get the length of a null terminated string.
void Copy(CharBuffer *buf)
bool Contains(const char c) const
void ClearAndCopy(const char *source)
Release memory, allocate and copy source.
void EnsureSize(unsigned int blocksize, unsigned int blocks)
unsigned int AllocAndCopy(char **destination, const char *source)
Allocate memory and copy a string into the array.
void Append(const char c, unsigned int count)
static const unsigned int minimumSize
Encapsulate an character array which can be used as a string.
void EnsureSize(unsigned int size)
Ensure a memory block of specified size is allocated.
void MemCopy(void *destination, const void *source, unsigned int length)
Copy a block of memory, handling overlap.
void ClearAndAlloc(unsigned int size)
Release memory and allocate new size.