clj-commons / camel-snake-kebab

A Clojure[Script] library for word case conversions
https://clj-commons.org/camel-snake-kebab/
Eclipse Public License 1.0
475 stars 48 forks source link

Add Sentence case and Title Case for string output #75

Open AdamClements opened 3 years ago

AdamClements commented 3 years ago

This is for the use-case of formatting a keyword or other symbol into something which you might show to the user in a plain sentence, addressing Feature requests #74 and #37

The main niggle here is that the naming scheme of the functions matches the output, which obviously can't contain a space. I have offered the compromise of stripping spaces from symbol names as they are unusable (though interestingly allowable).

I've also opted for simply "Sentence" and "Title", again for readability so we don't end up with e.g. ->Sentencecasesymbol. I'd be happy to update based on any feedback.

I haven't tested this on cljs, but I'm pretty sure I haven't added anything problematic there