mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-12 13:41:38 +00:00
17 lines
363 B
C#
17 lines
363 B
C#
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");
|
|
}
|
|
}
|