osdSPrintf
osdSPrintf
osd
1998 12-05
NAME
osdSPrintf - print formatted output
ARGUMENTS
| fmt |
format of the output string as per sprintf(3S)
|
| ... |
arguments to print
|
SYNOPSIS
osdSPrintf() formats the arguments following fmt according the
format specified by fmt, using the same specifiers as
sprintf(3S). osdSPrintf() allocates a string large enough to
hold the formatted output, which must be deallocated by the caller, and
populates it with the arguments.
RETURN
Returns a string containing the formatted output. It is the
responsibility of the caller to deallocate the memory for this string.
EXAMPLE
char *s;
s = osdSPrintf("%s is %d\\n", "The answer to the universe", 42);
osdFree (s);
SEE ALSO
osdVSPrintf(3)
DIAGNOSTICS
Providing a null address as an argument to the string specifiers (e.g.,
"%s") will most likely result in a core dump.