dashify method

String dashify()

Replaces all Uppercase letters with an dash and lowercase letter.

Implementation

String dashify() {
  return replaceAllMapped(RegExp('([A-Z])'), (match) {
    return '-${match.group(0)}'.toLowerCase();
  });
}