toCamelCase method

String toCamelCase([
  1. bool firstToUpper = true
])

Implementation

String toCamelCase([
  bool firstToUpper = true,
]) {
  if (isEmpty) return this;
  final replaced = replaceAll(RegExp(r'[^A-Za-z ]+'), '');
  if (firstToUpper) {
    return replaced.firstToUpperCase();
  }
  return replaced;
}