toHyphenCase method

String toHyphenCase()

Implementation

String toHyphenCase() {
  final replaced = this.replaceAll(" ", "-");

  return replaced
      .split("-")
      .map((s) {
        return s.toLowerCase();
      })
      .toList()
      .join("-");
}