Platform Package reference: Function EwGetUtf8StringLength()

Description of the function EwGetUtf8StringLength() available in all Platform Packages for ANSI C compatible target systems. This function is intended to be used when integrating the Embedded Wizard created GUI application with the underlying graphics subsystem, graphics hardware or other external GUI applications coexisting on the same system.


XInt32 EwGetUtf8StringLength( XString aString )



Pointer to the wide-character (16-bit per character) string to determinate its UTF-8 length (the number of bytes in UTF-8 format).


The function EwGetUtf8StringLength() analyzes the characters in the given 16-bit wide-character string aString and estimates the length in bytes for a corresponding UTF-8 string without the zero terminator sign. This value can be used to reserve memory before using the function EwStringToUtf8(). If the string is empty, the function returns 0 (zero).