startsWithUpper method

bool startsWithUpper()

should not start with "_".

Implementation

bool startsWithUpper() {
  check(isNotEmpty && trim() == this && !contains(' '));
  final first = substring(0, 1);
  check(first != '_');
  final upperFirst = first.toUpperCase();
  return first == upperFirst;
}