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)); } }
public static string Quote(this string str, QuoteKind quote) { return(StringUtils.Quote(str, quote)); }