Open System Services Library Calls Reference Manual (G06.28+, H06.05+)
OSS Library Calls (s) snprintf(3)
RETURN VALUES
Upon successful completion, this function returns the number of bytes that would have been
stored had n been sufficiently large (not counting the terminating null character). Otherwise, a
negative value is returned. Thus, the null-terminated output has been completely stored if and
only if the returned value is nonnegative and less than n.
The value returned by the snprintf( ) function does not include the final ’\0’ (null) character.
ERRORS
None. The snprintf() function does not set errno.
RELATED INFORMATION
Functions: fp_class(3), fprintf(3), isnan(3), toascii(3), putc(3), printf(3), scanf(3), sprintf(3),
vsnprintf(3).
STANDARDS CONFORMANCE
This function conforms to the UNIX98 specification.
527187-007 Hewlett-Packard Company 6−61