Canguro.Commands.Model.ExportS2kCmd.EncodeValue C# (CSharp) Méthode

EncodeValue() private static méthode

private static EncodeValue ( string &text ) : string
text string
Résultat string
        private static string EncodeValue(ref string text)
        {
            buffStr.Remove(0, buffStr.Length);
            foreach (char c in text)
            {
                if (c == '\'')
                    buffStr.Append("'");
                else if (c == '"')
                    buffStr.Append(""");
                else if ((c <= 0x1f && c != 0x9 && c != 0x10 && c != 0x13) || c > 127)
                    buffStr.Append(string.Format("&#x{0:x};", (int)c));
                else
                    buffStr.Append(c);
            }
            return buffStr.ToString();
        }