man rbuf_sprintf (Fonctions bibliothèques) - creating formatted rbuf's

NAME

rbuf_sprintf - creating formatted rbuf's

SYNOPSIS

#include <roy.h>

void rbuf_sprintf (RBuf *buf, const char *format, ...);

void rbuf_append_sprintf (RBuf *buf, const char *format, ...);

void rbuf_append_vsprintf (RBuf *buf, const char *format, va_list args);

RBuf * rbuf_new_with_sprintf (const char *format, ...);

DESCRIPTION

These functions are used to insert formatted strings into an RBuf.

A call to rbuf_sprintf(3) resets the current contents of the rbuf with the formatted string.

A call to rbuf_append_sprintf(3) appends the formatted string to the rbuf.

A call to rbuf_append_vsprintf(3) is identical to rbuf_append_sprintf(3) except that a *va_list is used as the arguments to the formatted string *format.

A call to rbuf_new_with_sprintf(3) creates a new rbuf with its buffer set to the formatted string.

RBUF FORMAT SPECIFICATION

The RBuf sprintf calls all implement CW%b as a format specification for rufs.

RETURN VALUE

All these calls with the exception of rbuf_new_with_sprintf(3) have no return value. rbuf_new_with_sprintf(3) returns an rbuf struct for use with other rbuf calls. The programmer should free this rbuf a call to rbuf_free(3) when he/she is done using the rbuf.

ERRORS

These calls do not error.

FUNCTION

All rbuf_sprintf(3) style api calls are implemented using functions.

SEE ALSO