isEscapedName function

bool isEscapedName(
  1. String name
)

True if a name had been escaped already.

Implementation

bool isEscapedName(String name) {
  if (name.length >= 2) {
    final codeUnits = name.codeUnits;
    if (_areCodeUnitsEscaped(codeUnits)) {
      return escapeNames
          .contains(name.substring(1, name.length - 1).toLowerCase());
    }
  }
  return false;
}