Standard C++ Library Reference ISO/IEC (VERSION3)

strstreambuf::str
char *str();
The member function calls freeze(), then returns a pointer to the beginning of the controlled
sequence. (Note that no terminating null element exists, unless you insert one explicitly.)
strstreambuf::strstreambuf
explicit strstreambuf(streamsize count = 0);
strstreambuf(void (*allocfunc)(size_t),
void (*freefunc)(void *));
strstreambuf(char *getptr, streamsize count,
char *putptr = 0);
strstreambuf(signed char *getptr, streamsize count,
signed char *putptr = 0);
strstreambuf(unsigned char *getptr, streamsize count,
unsigned char *putptr = 0);
strstreambuf(const char *getptr, streamsize count);
strstreambuf(const signed char *getptr, streamsize count);
strstreambuf(const unsigned char *getptr, streamsize count);
The first constructor stores a null pointer in all the pointers controlling the input buffer, the
output buffer, and strstreambuf allocation. It sets the stored strstreambuf mode to make the
controlled sequence modifiable and extendable. And it accepts count as a suggested initial
allocation size.
The second constructor behaves much as the first, except that it stores allocfunc as the
pointer to the function to call to allocate storage, and freefunc as the pointer to the function
to call to free that storage.
The three constructors:
strstreambuf(char *getptr, streamsize count,
char *putptr = 0);
strstreambuf(signed char *getptr, streamsize count,
signed char *putptr = 0);
strstreambuf(unsigned char *getptr, streamsize count,
unsigned char *putptr = 0);
also behave much as the first, except that getptr designates the array object used to hold the
controlled sequence. (Hence, it must not be a null pointer.) The number of elements N in the
array is determined as follows:
If (count > 0), then N is count.
If (count == 0), then N is strlen((const char *)getptr).
If (count < 0), then N is INT_MAX.