# STD_ConvertStringUnicodeToSjis

## Syntax

      #include <nitro/std.h>
      STDResult STD_ConvertStringUnicodeToSjis(char *dst, int *dst_len, const u16 *src, int *src_len, STDConvertSjisCallback callback);

## Arguments

`dst` | Shift-JIS string buffer for storing the converted string. If `NULL`, the storing process is ignored.
`dst_len` | Passing the maximum byte size that can be stored in the destination buffer, this pointer accepts the byte size that was actually stored. Ignored when `NULL` is specified.
`src` | Unicode string buffer for string to be converted.
`src_len` | Passing the maximum number of characters that should be converted, this pointer accepts the number of characters that were actually converted. Note that this is not the byte size. If a negative number is passed or if `NULL` is specified, it is treated as if the length up to `src` was specified.
`callback` | Callback that will be called if there are any characters that cannot be converted.

## Return Values

Returns an `STDResult` type value that gives the conversion result. If `dst` is other than NULL, the converted string is stored in `dst` and the post-conversion byte size is returned in `src_len` and `dst_len`. If `dst` is `NULL`, the post-conversion byte size is returned; the converted string is not stored.
The null terminator '`\0`' is not given or included in the character count.

## Description

Converts the Unicode string to a Shift-JIS string. If a Unicode character that cannot be converted by the function is found, a callback for that event is generated.
If `NULL` specifies the callback, processing will terminate when an unconvertible character appears.
If `NULL` is specified for `dst`, only the post-conversion character length can be found.

## See Also

`STDResult`
`STD_ConvertStringSjisToUnicode`
`STD_ConvertCharSjisToUnicode`
`STD_ConvertCharUnicodeToSjis`
`STDConvertSjisCallback`

## Revision History

2006/08/10 Changed the interface.
2006/07/24 Changed the interface.
2006/07/05 Initial version.

CONFIDENTIAL