toUpperStart method

String toUpperStart()

should not start with "_".

Implementation

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