snprintf
Formatting output into unpacked string
Syntax: snprintf(dest[],size=sizeof dest,const format[], {Fixed, }:...)
dest[]
string array where to store formatted outputsize
size of output arrayconst format[]
string array with formatting text...
variable arguments used to feed into formatting text
Notes: This function works in the same was as printf with the exception that it stores the output into the destination. The size of the destination must be specified and usually is retrieved during runtime by leaving a standard value.
Example: snprintf(dest,"My name is %s\r\n", ,name)
, stands for sizeof dest and it is filled automatically in runtime
See also: printf
Last updated
Was this helpful?