MKI_ConvertUTF16ToInt32 (Strings) New in Version 2019.1

www.CAD6.com

C++ Syntax

__int32

MKI_ConvertUTF16ToInt32(

 const LPCWSTR f_pszSource,

 __int32& f_rDestin );

 

Reads the next Unicode character from a UTF-16 string and returns its value.

 

Parameters

Source

[const LPCWSTR] Address of the source UTF-16 text.

Destin

[__int32&] Reference to an integer that will receive the Unicode character value. If will be in a range of 0x00000000 to 0x0000ffff.

 

Return Value

Returns the number of characters used from the UTF-16 text (either 1 or 2).

 

Comment

In case of an invalid UTF-16 text with isolated surrogates, values of 0x0000d800 to 0x0000dfff (surrogates) may be returned although those are undefined Unicode characters.

 

CAD6interface 2025.0 - Copyright 2025 Malz++Kassner® GmbH