allow append of n equal bytes
This commit is contained in:
@ -106,8 +106,8 @@ public:
|
|||||||
{grow(size); char* p=buffer+len; len+=size; return p;}
|
{grow(size); char* p=buffer+len; len+=size; return p;}
|
||||||
|
|
||||||
// append: append data at the end of the buffer
|
// append: append data at the end of the buffer
|
||||||
StreamBuffer& append(char c)
|
StreamBuffer& append(char c, long count=1)
|
||||||
{check(1); buffer[offs+len++]=c; return *this;}
|
{check(count); while(count-->0) buffer[offs+len++]=c; return *this;}
|
||||||
|
|
||||||
StreamBuffer& append(const void* s, long size);
|
StreamBuffer& append(const void* s, long size);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user