Class LuaSource
Helpers for emitting Lua source from C#. Centralised so that string values flowing from catalogue declarations into generated Lua (e.g. context parameter ids, types, and defaults) are escaped consistently and safely.
public static class LuaSource
- Inheritance
-
LuaSource
- Inherited Members
Methods
EscapeLiteral(string?)
Escapes a string for inclusion inside a single-quoted Lua string literal. Handles the backslash and quote delimiters as well as newline, carriage-return, tab, and other control characters so that arbitrary catalogue values cannot break out of the literal or inject Lua syntax.
public static string EscapeLiteral(string? value)
Parameters
valuestring