surroundingQuote method

String surroundingQuote(
  1. String val
)

If val is wrapped in single or double quotes, returns the quote character. Otherwise, returns the empty string.

Implementation

String surroundingQuote(String val) {
  if (!_surroundQuotes.hasMatch(val)) return '';
  return _surroundQuotes.firstMatch(val)!.group(1)!;
}