#include <nitro/std.h>
int STD_TVSNPrintf( char *dst, size_t len, const char *fmt, va_list vlist );
dst | Storage destination buffer for the output string. |
len | Storage destination buffer size for the output string. |
fmt | Output format string. |
vlist | List containing a variable number of arguments. |
Always returns the number of characters of a correctly formatted output string. The termination character (\0
) is not included in this number.
The output string is written to dst. If the output string is less than len, the entire string and the terminator (\0
) are written.
If the output string is greater than or equal to len AND:
(1) len is not zero, the terminator (\0
) is written to dst[len - 1]
(2) len is zero, nothing is done to dst.
Returns the simplified version of the format string.
This function operates identically to the vsnprintf
function from MSL, but the following features cannot be used.
- CodeWarrior extension Pascal strings (#s
)
- MSL AltiVec extensions (v
,vh
,vl
,hv
,lv
,@
)
- Floating Points (e
,E
,f
,g
,G
,a
,A
)
- Wide strings (wchar_t
)
Note: Shift_JIS formatted multibyte strings can be used.
This function is compiled with weak symbols. Therefore, you can overwrite them with your own function definitions.
However, this function may be used by TWL-SDK functions, high-level libraries, middleware, and other sources, so be careful not to change its behavior when you overwrite it.
STD_TSPrintf
STD_TVSPrintf
STD_TSNPrintf
2009/03/27 Added a note related to user-defined functions.
2007/04/20 Initial version.
CONFIDENTIAL