inflections-clj
inflections-clj copied to clipboard
Rails-like inflection library for Clojure and ClojureScript
-
Inflections
[[https://clojars.org/inflections][https://img.shields.io/clojars/v/inflections.svg]] [[https://github.com/r0man/inflections-clj/actions?query=workflow%3A%22Clojure+CI%22][https://github.com/r0man/inflections-clj/workflows/Clojure%20CI/badge.svg]] [[https://versions.deps.co/r0man/inflections-clj][https://versions.deps.co/r0man/inflections-clj/status.svg]] [[https://versions.deps.co/r0man/inflections-clj][https://versions.deps.co/r0man/inflections-clj/downloads.svg]]
Rails-like inflection library for Clojure and ClojureScript.
** Usage
#+BEGIN_EXAMPLE (use 'inflections.core)
(plural "word")
;=> "words"
(plural "virus")
;=> "viri"
(pluralize 12 "virus")
;=> "12 viri"
(singular "apples")
;=> "apple"
(singular "octopi")
;=> "octopus"
(underscore "puni-puni")
;=> "puni_puni"
(ordinalize "52")
;=> "52nd"
(capitalize "clojure")
;=> "Clojure"
#+END_EXAMPLE
** License
Copyright (C) 2013-2022 [[https://github.com/r0man][r0man]]
Distributed under the Eclipse Public License, the same as Clojure.