1SNPRINTF(9) Basic C Library Functions SNPRINTF(9)
2
3
4
6 snprintf - Format a string and place it in a buffer
7
9 int snprintf(char * buf, size_t size, const char * fmt, ...);
10
12 buf
13 The buffer to place the result into
14
15 size
16 The size of the buffer, including the trailing null space
17
18 fmt
19 The format string to use @...: Arguments for the format string
20
21 ...
22 variable arguments
23
25 The return value is the number of characters which would be generated
26 for the given input, excluding the trailing null, as per ISO C99. If
27 the return is greater than or equal to size, the resulting string is
28 truncated.
29
30 See the vsnprintf documentation for format string extensions over C99.
31
33Kernel Hackers Manual 2.6. November 2011 SNPRINTF(9)