stpeprintf(3) Library Functions Manual stpeprintf(3) NAME stpeprintf, vstpeprintf - create a formatted string with truncation LIBRARY stp string library (libstp, pkgconf ‐‐cflags ‐‐libs libstp) SYNOPSIS #include char *_Nullable stpeprintf(char *_Nullable dst, char end[0], const char *restrict fmt, ...); char *_Nullable vstpeprintf(char *_Nullable dst, char end[0], const char *restrict fmt, va_list ap); DESCRIPTION These functions are almost identical to snprintf(3) and vsnprintf(3). The destination buffer is limited by a pointer to its end —one after its last element— instead of a size. These functions can be chained with calls to stpeprintf(3) and vstpeprintf(3). RETURN VALUE NULL • If this function failed (see ERRORS). • If dst was NULL. end • If this call truncated. • If dst was equal to end (a previous call to these functions truncated). dst + strlen(dst) On success, these functions return a pointer to the terminating null byte. ERRORS These functions may fail for any of the same reasons as vsnprintf(3). ATTRIBUTES For an explanation of the terms used in this section, see attrib‐ utes(7). ┌────────────────────────────────────────────┬───────────────┬─────────┐ │Interface │ Attribute │ Value │ ├────────────────────────────────────────────┼───────────────┼─────────┤ │stpeprintf(3), vstpeprintf(3) │ Thread safety │ MT‐Safe │ └────────────────────────────────────────────┴───────────────┴─────────┘ STANDARDS None. EXAMPLES See stpecpy(3). SEE ALSO stpecpy(3), string_copying(7) libstp (unreleased) (date) stpeprintf(3)