private static EscapeInitialAndClosingDoubleQuotes ( string code ) : string | ||
code | string | |
return | string |
private static string EscapeInitialAndClosingDoubleQuotes(string code)
{
if (code.StartsWith(DoubleQuote))
code = ClosingQuoteReplacement + code.Substring(DoubleQuote.Length);
if (code.EndsWith(DoubleQuote))
code = code.Substring(0, code.Length - DoubleQuote.Length) + ClosingQuoteReplacement;
return code;
}