namespace AIStudio.Tools; public static class LuaTools { public static string EscapeLuaString(string? value) { if (string.IsNullOrEmpty(value)) return string.Empty; return value .Replace("\\", "\\\\") .Replace("\"", "\\\"") .Replace("\r", "\\r") .Replace("\n", "\\n"); } }