capitalizeFirst static method

String? capitalizeFirst(
  1. String s
)

Uppercase first letter inside string and let the others lowercase Example: your name => Your name

Implementation

static String? capitalizeFirst(String s) {
  if (isNull(s)) {
    return null;
  }
  if (isBlank(s)!) {
    return s;
  }
  return s[0].toUpperCase() + s.substring(1).toLowerCase();
}