Go to the first, previous, next, last section, table of contents.

C-style formatting for streambuf objects

The GNU streambuf class supports printf-like formatting and scanning.

Method: int streambuf::vform (const char *format, ...)

Similar to fprintf(file, format, ...). The format is a printf-style format control string, which is used to format the (variable number of) arguments, printing the result on the this streambuf. The result is the number of characters printed.

Method: int streambuf::vform (const char *format, va_list args)

Similar to vfprintf(file, format, args). The format is a printf-style format control string, which is used to format the argument list args, printing the result on the this streambuf. The result is the number of characters printed.

Method: int streambuf::scan (const char *format, ...)

Similar to fscanf(file, format, ...). The format is a scanf-style format control string, which is used to read the (variable number of) arguments from the this streambuf. The result is the number of items assigned, or EOF in case of input failure before any conversion.

Method: int streambuf::vscan (const char *format, va_list args)

Like streambuf::scan, but takes a single va_list argument.


Go to the first, previous, next, last section, table of contents.