(ns app-macros.util.string
  (:require [clojure.string :as str]))

(defn camel->kebab
  "Converts from camel case (e.g. Foo or FooBar) to kebab case
   (e.g. foo or foo-bar)."
  [s]
  (str/lower-case (str/replace s #"(.+)([A-Z])" "$1-$2")))

(ns app-macros.util.string
  (:require [clojure.string :as str]))

(defn camel->kebab
  "Converts from camel case (e.g. Foo or FooBar) to kebab case
   (e.g. foo or foo-bar)."
  [s]
  (->> s
       (re-seq #"[A-Z][a-z0-9_-]*")
       (str/join "-")
       (str/lower-case)))

Use re-seq to fix splitting up words in camel->kebab converter
Use re-seq to fix splitting up words in camel->kebab converter

workfloapp/app-macros,workfloapp/macros,workfloapp/macros