Sun Java System Web Server 6.1 SP9 NSAPI Programmer's Guide


The util_vsnprintf function formats a specified string, using a specified format, into a specified buffer using the vprintf-style syntax. The function performs bounds checking and returns the number of characters in the formatted buffer.

For more information, see the documentation on the printf function for the runtime library of your compiler.


int util_vsnprintf(char *s, int n, register char *fmt, va_list args);


The number of characters formatted into the buffer.


char *s is the buffer to receive the formatted string.

int n is the maximum number of bytes allowed to be copied.

register char *fmt is the format string. The function handles only %d and %s strings; it does not handle any width or precision strings.

va_list args is an STD argument variable obtained from a previous call to va_start.

See Also

util_sprintf, util_vsprintf