24#define GROW_AMOUNT 1024*4
53 :
m_str(std::exchange(other.
m_str,static_cast<char*>(nullptr)))
62 m_len = std::exchange(other.m_len,0);
63 m_pos = std::exchange(other.m_pos,0);
64 m_str = std::exchange(other.m_str,
static_cast<char*
>(
nullptr));
99 void addStr(
const char *s,
size_t n) {
111 snprintf(tmp,50,fmt,value);
118 const char &
at(
size_t i)
const {
return m_str[i]; }
GrowBuf & operator=(const GrowBuf &other)
void addInt(const char *fmt, int value)
void addStr(const QCString &s)
const char & at(size_t i) const
void setPos(size_t newPos)
void reserve(size_t size)
GrowBuf(const GrowBuf &other)
void addStr(const char *s)
GrowBuf & operator=(GrowBuf &&other)
void addStr(const char *s, size_t n)
GrowBuf(size_t initialSize)
void addStr(const std::string &s)
size_t length() const
Returns the length of the string, not counting the 0-terminator.
bool isEmpty() const
Returns TRUE iff the string is empty.
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.