nn::enc::ConvertStringUtf16NativeToUtf8 FunctionResult ConvertStringUtf16NativeToUtf8( u8 * pDst, s32 * pDstSize, const u16 * pSrc, s32 * pSrcSize );
| Name | Description | |
|---|---|---|
| out | pDst |
The buffer into which the converted string is written. No terminating character is added. A string is not written when pDst is NULL. |
pDstSize |
The size of the buffer into which the converted string is written. This is the size of the converted string in *pDst (the size of the buffer divided by the size of the type). After data is converted, this stores a value that indicates how much was written to the buffer. When pDst is NULL, the size of the output buffer is ignored and this instead stores the buffer size necessary for writing the converted string. |
|
| out | pSrc |
The source string buffer. |
pSrcSize |
Size of the source string buffer. This is the size of the string to convert in *pSrc (the size of the buffer divided by the size of the type). Data is not read beyond the size specified by pSrcSize. If pSrcSize is NULL or negative, data is read from pSrc until a terminating character is found. If pSrcSize is not NULL, this stores the size of the string buffer that is read. |
| Value | Description |
|---|---|
ResultNoBufferLeft |
Insufficient buffer size. |
ResultInvalidParameter |
An invalid argument was passed. |
ResultInvalidFormat |
An unconvertible character was detected. |
Converts the character code of the provided string from UTF-16LE to UTF-8 in little-endian environments and from UTF-16BE to UTF-8 in big-endian environments, and then gets the buffer size required to write the converted string. No terminating character is added. If a destination buffer is not specified, the buffer size necessary for the write operation will be obtained.
CONFIDENTIAL