Beispiel #1
0
        public static string Quote(string str, QuoteKind quote)
        {
            switch (quote)
            {
            case QuoteKind.Single:
                return(string.Concat(SingleQuote, str, SingleQuote));

            case QuoteKind.Double:
                return(string.Concat(DoubleQuote, str, DoubleQuote));

            default:
                throw new ArgumentOutOfRangeException(nameof(quote));
            }
        }
Beispiel #2
0
 public static string Quote(this string str, QuoteKind quote)
 {
     return(StringUtils.Quote(str, quote));
 }