MonoDevelop.Gettext.StringEscaping.FromCSharpVerbatimFormat C# (CSharp) Method

FromCSharpVerbatimFormat() static private method

static private FromCSharpVerbatimFormat ( string text ) : string
text string
return string
        static string FromCSharpVerbatimFormat(string text)
        {
            StringBuilder sb = new StringBuilder ();
            for (int i = 0; i < text.Length; i++) {
                char c1 = text[i];
                if (c1 == '"') {
                    i++;
                    char c2 = text[i];
                    if (c2 != '"')
                        throw new FormatException ("Unescaped '\"' character in C# verbatim string.");
                }
                sb.Append (c1);
            }
            return sb.ToString ();
        }