23 #ifndef __ccxx_CStringBuilder_hxx 24 #define __ccxx_CStringBuilder_hxx 95 CStringBuilder& append(
int val,
size_t width,
bool zeroPad =
true);
122 {
return(_left > 0); }
129 {
return(_pos - _buf); }
136 {
return(getLength()); }
149 bool bump(
size_t delta);
156 {
return(append(s)); }
160 {
return(append(c)); }
166 template<
typename T>
char* _formatValue(T value,
size_t width,
char padChar,
167 char* buf,
size_t bufsz);
177 #endif // __ccxx_CStringBuilder_hxx char * c_str() const
Get a pointer to the beginning of the buffer.
Definition: CStringBuilder.h++:139
size_t length() const
Get the current length of the buffer, that is, the number of characters currently in the buffer...
Definition: CStringBuilder.h++:135
A utility class for constructing C-style strings.
Definition: CStringBuilder.h++:42
char * getPosition() const
Get a pointer to the current write position for the buffer.
Definition: CStringBuilder.h++:110
unsigned int uint_t
An alias for unsigned int.
Definition: Integers.h++:74
bool hasRemaining() const
Determine if the buffer has space remaining for additional characters.
Definition: CStringBuilder.h++:121
size_t getLength() const
Get the current length of the buffer, that is, the number of characters currently in the buffer...
Definition: CStringBuilder.h++:128
CStringBuilder & operator+=(const char *s)
Append operator.
Definition: CStringBuilder.h++:155
#define COMMONCPP_API
Definition: Common.h++:126
An implicitly shared, reference-counted container for an immutable, NUL-terminated C string...
Definition: CString.h++:39
#define CCXX_COPY_DECLS(CLASS)
Inlines declarations of a copy constructor and assignment operator for the class CLASS.
Definition: Common.h++:295
CStringBuilder & operator+=(char c)
Append operator.
Definition: CStringBuilder.h++:159
Definition: AllocationMap.c++:25
size_t getRemaining() const
Get the remaining capacity of the buffer, that is, the number of characters that can still be written...
Definition: CStringBuilder.h++:117