unquote method

String unquote(
  1. String val
)

Removes quotes (single or double) surrounding a value.

Implementation

String unquote(String val) {
  if (!_surroundQuotes.hasMatch(val)) {
    return strip(val, includeQuotes: true).trim();
  }
  return _surroundQuotes.firstMatch(val)!.group(2)!;
}