API:StringToWString
From RoR Wiki
UI Lua API · Interface functions
Version: WAR 1.4.8
Converts an ordinary Lua string to a wide string.
wideText = StringToWString(text)
Arguments
- text
string– The string to convert.
Returns
- wideText
wstring– The converted string.
Details
- Each byte of
textbecomes one wide character with the same value. This is correct for ASCII. Multi-byte UTF-8 sequences are not decoded: each of their bytes becomes a separate character. - The conversion stops at the first zero byte.
textmust be a string; a number or a wide string raises the generic Invalid Parameters message and the function returns nothing.- Exactly one argument must be passed.
Errors
None besides the generic Invalid Parameters message.
Example
A minimal call built from the signature:
LabelSetText( "MyLabel", StringToWString( "Hello" ) )
