API:WStringToString
From RoR Wiki
UI Lua API · Interface functions
Version: WAR 1.4.8
Converts a wide string to an ordinary Lua string.
text = WStringToString(wideText)
Arguments
- wideText
wstring– The wide string to convert.
Returns
- text
string– The converted string.
Details
- Each wide character is cut to its low 8 bits. ASCII text converts correctly; characters above 255 (for example Cyrillic or other non-Latin letters) turn into unrelated single-byte characters.
wideTextmust be a wide string; an ordinary string or a number 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:
local name = WStringToString( L"Hello" ) -- "Hello"
