toKebabCase method

String toKebabCase()

Implementation

String toKebabCase() {
  return replaceAllMapped(
    RegExp(r'[A-Z]'),
    (match) => '-${match.group(0)!.toLowerCase()}',
  ).replaceFirst(RegExp(r'^-'), '');
}