3ds Max C++ API Reference
|
Classes | |
class | Char |
Represents a single Unicode character. More... | |
class | CharIterator< ChType > |
Iterate intelligently inside a string. More... | |
class | CharAccumulator |
Character accumulator. More... | |
Namespaces | |
MaxSDK | |
MaxSDK::Util | |
Functions | |
UtilExport size_t | UTF32ToWideChar (const unsigned int *lpUTF32CharStr, size_t ccUTF32Char, wchar_t *lpWideCharStr, size_t cchWideChar) |
Convert a UTF32 character string to UTF16 characters. More... | |
UtilExport size_t | WideCharToUTF32 (const wchar_t *lpWideCharStr, size_t cchWideChar, unsigned int *lpUTF32CharStr, size_t ccUTF32Char) |
Convert UTF16 character string to UTF32 characters. More... | |
UtilExport size_t UTF32ToWideChar | ( | const unsigned int * | lpUTF32CharStr, |
size_t | ccUTF32Char, | ||
wchar_t * | lpWideCharStr, | ||
size_t | cchWideChar | ||
) |
Convert a UTF32 character string to UTF16 characters.
lpUTF32CharStr | Pointer to the character string to convert. |
ccUTF32Char | Size, in WWCHAR, of the string indicated by the lpUTF32CharStr parameter. Alternatively, this parameter can be set to -1 if the string is null-terminated. Note that, if ccUTF32Char is 0, the function fails. |
If this parameter is -1, the function processes the entire input string, including the terminating null character. Therefore, the resulting Unicode string has a terminating null character, and the length returned by the function includes this character.
If this parameter is set to a positive integer, the function processes exactly the specified number of bytes. If the provided size does not include a terminating null character, the resulting Unicode string is not null-terminated, and the returned length does not include this character.
lpWideCharStr | Optional. Pointer to a buffer that receives the converted string. |
cchWideChar | Size, in WCHAR, of the buffer indicated by lpWideCharStr. If this value is 0, the function returns the required buffer size, in characters, including any terminating null character, and makes no use of the lpWideCharStr buffer. |
The function returns 0 if it does not succeed. To get extended error information, the application can call GetLastError, which can return one of the following error codes:
UtilExport size_t WideCharToUTF32 | ( | const wchar_t * | lpWideCharStr, |
size_t | cchWideChar, | ||
unsigned int * | lpUTF32CharStr, | ||
size_t | ccUTF32Char | ||
) |
Convert UTF16 character string to UTF32 characters.
lpWideCharStr | Pointer to the character string to convert. |
cchWideChar | Size, in WCHAR, of the string indicated by the lpWideCharStr parameter. Alternatively, this parameter can be set to -1 if the string is null-terminated. Note that, if cchWideChar is 0, the function fails. |
If this parameter is -1, the function processes the entire input string, including the terminating null character. Therefore, the resulting Unicode string has a terminating null character, and the length returned by the function includes this character.
If this parameter is set to a positive integer, the function processes exactly the specified number of bytes. If the provided size does not include a terminating null character, the resulting Unicode string is not null-terminated, and the returned length does not include this character.
lpUTF32CharStr | Optional. Pointer to a buffer that receives the converted string. |
ccUTF32Char | Size, in WWCHAR, of the buffer indicated by lpUTF32CharStr. If this value is 0, the function returns the required buffer size, in characters, including any terminating null character, and makes no use of the lpUTF32CharStr buffer. |
The function returns 0 if it does not succeed. To get extended error information, the application can call GetLastError, which can return one of the following error codes: