AGS.Plugin.Lua.InvokeLua.util_quotestring C# (CSharp) Метод

util_quotestring() публичный статический Метод

public static util_quotestring ( string s ) : string
s string
Результат string
        public static string util_quotestring(string s)
        {
            return "\"" + Regex.Replace(s, @"[\\\r\n\t""\0]",
                delegate(Match m)
                {
                    switch (m.Value[0])
                    {
                        case '\r':
                            return @"\r";
                        case '\n':
                            return @"\n";
                        case '\t':
                            return @"\t";
                        case '"':
                            return @"\""";
                        case '\\':
                            return @"\\";
                        default:
                            return string.Format(@"\{0:000}", (int)m.Value[0]);
                    }
                }) + "\"";
        }
InvokeLua