matchesFormat static method

bool matchesFormat(
  1. String data
)

Implementation

static bool matchesFormat(String data) {
  if (data.length < 3) return false;

  var length = data.length;
  if (length < 3) return false;

  var idx = data.indexOf('#');
  if (idx < 1) return false;

  if (!matchesType(data, 0, idx)) return false;

  var idLength = (length - idx) - 1;
  if (!matchesID(data, idx + 1, idLength)) return false;

  return true;
}