Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:WStringToString

From RoR Wiki
Revision as of 19:51, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.
  • wideText must 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"

See also