# OS_VSNPrintf

## C Specification

      #include <nitro/os.h>

      int OS_VSNPrintf(
                  char        *dst ,
                  size_t      len ,
          const   char        *fmt ,
                  va_list     vlist );

## Description

This function returns the simplified version of the format character string.

This function operates identically to `vsnprintf()` from MSL, but the following features cannot be used:

- CodeWarrior extension Pascal character string (`#`s)
- MSL AltiVec extensions (`v`, `vh`, `vl`, `hv`, `lv`, `@`)
- Floating Points (`e`, `E`, `f`, `g`, `G`, `a`, `A`)
- Wide character string (`wchar_t`)

NOTE: The shift JIS mutli-byte character string can be used.

This function is compiled with weak symbols. Therefore you can overwrite them with your own function definitions.

This function is used for debugging. It will not be generated in the final ROM version (`FINALROM`).

## Arguments

`dst` | Storage destination buffer for output character string
`len` | Storage destination buffer size for output character string
`fmt` | Output format character string (format character string)
`vlist` | Variable argument list

## Return Values

Always returns the number of characters if the format character string was output properly.

The termination character ( `\0` ) is not included in this number.

The output character string is written to `dst`.

If the output character string is less than `len`, all of the character strings and termination character ( `\0` ) are written.

If the output character string is greater than or equal to `len`:

1. If len is not 0, the termination character ( `\0` ) is written to `dst[len - 1]`.
2. If len is 0, nothing is done with `dst`.

## See Also

`OS_SPrintf`, `OS_VSPrintf`, `OS_SNPrintf`

## Revision History

11/25/2004 Added description of weak symbols.
06/15/2004 Changed "termination NUL" to "termination character ( `\0` )".
03/26/2004 Initial version