1 /* snprintf( char *, size_t, const char *, ... )
3 This file is part of the Public Domain C Library (PDCLib).
4 Permission is granted to use, modify, and / or redistribute at will.
12 int snprintf( char * _PDCLIB_restrict s, size_t n, const char * _PDCLIB_restrict format, ...)
16 va_start( ap, format );
17 rc = vsnprintf( s, n, format, ap );
25 #define _PDCLIB_FILEID "stdio/snprintf.c"
26 #define _PDCLIB_STRINGIO
28 #include "_PDCLIB_test.h"
30 #define testprintf( s, format, ... ) snprintf( s, 100, format, __VA_ARGS__ )
35 #include "printf_testcases.h"
36 TESTCASE( snprintf( NULL, 0, "foo" ) == 3 );
37 TESTCASE( snprintf( NULL, 0, "%d", 100 ) == 3 );