isDashedIdent static method

bool isDashedIdent(
  1. String value
)

Implementation

static bool isDashedIdent(String value) {
  if (value.length < 3) return false;
  if (value.codeUnitAt(0) != 0x2D /* - */ || value.codeUnitAt(1) != 0x2D /* - */) return false;
  if (!_isIdentStart(value.codeUnitAt(2))) return false;
  for (int i = 3; i < value.length; i++) {
    if (!_isIdentContinue(value.codeUnitAt(i))) return false;
  }
  return true;
}