12 lines
193 B
C++
12 lines
193 B
C++
#include "stringbuffer.h"
|
|
|
|
void Stringbuffer::put(char c) {
|
|
if (pos < (sizeof(buffer) - 1)) {
|
|
buffer[pos++] = c;
|
|
buffer[pos] = '\0';
|
|
}
|
|
if (pos >= (sizeof(buffer) - 1)) {
|
|
flush();
|
|
}
|
|
}
|