(acronym s)
Returns the the acronym for s
if it is one, otherwise nil.
Returns the the acronym for `s` if it is one, otherwise nil.
(add-acronym! word)
Adds word
to the set of *acronyms*
.
Adds `word` to the set of `*acronyms*`.
(add-irregular! singular plural)
Add singular
and plural
to the set of *irregular-words*
.
Add `singular` and `plural` to the set of `*irregular-words*`.
(add-rule! rules rule)
(add-uncountable! word)
Adds word
to the set of *uncountable-words*
.
Adds `word` to the set of `*uncountable-words*`.
(cardinalize-keyword f)
(coerce obj s)
Coerce the string s
to the type of obj
.
Coerce the string `s` to the type of `obj`.
(countable? s)
Returns true if s
is countable, otherwise false.
Returns true if `s` is countable, otherwise false.
(delete-acronym! word)
Delete word
from the set of *acronyms*
.
Delete `word` from the set of `*acronyms*`.
(delete-irregular! singular plural)
Delete singular
and plural
from the set of irregular-words.
Delete `singular` and `plural` from the set of *irregular-words*.
(delete-uncountable! word)
Delete word
from the set of *uncountable-words*
.
Delete `word` from the set of `*uncountable-words*`.
(init-inflections!)
Initialize the Inflections library with defaults.
Initialize the Inflections library with defaults.
(init-irregular-words!)
(init-plural-rules!)
(init-singular-rules!)
(irregular? word)
Returns true if word
is an irregular word, otherwise false.
Returns true if `word` is an irregular word, otherwise false.
(ordinality-of s)
Returns :singular, :plural, or nil.
Returns :singular, :plural, or nil.
(ordinalize x)
Turns x
into an ordinal string used to denote the position in an
ordered sequence such as 1st, 2nd, 3rd, 4th, etc.
Examples:
(ordinalize "1") ;=> "1st"
(ordinalize "23") ;=> "23rd"
Turns `x` into an ordinal string used to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th, etc. Examples: (ordinalize "1") ;=> "1st" (ordinalize "23") ;=> "23rd"
(plural! & patterns-and-replacements)
Define rule(s) to map words from singular to plural.
Examples: (plural! #"$(?i)" "s") (plural! #"(ax|test)is$(?i)" "$1es" #"(octop|vir)us$(?i)" "$1i")
Define rule(s) to map words from singular to plural. Examples: (plural! #"$(?i)" "s") (plural! #"(ax|test)is$(?i)" "$1es" #"(octop|vir)us$(?i)" "$1i")
(plural? s)
Returns true if calling plural on a value returns the same value
Returns true if calling plural on a value returns the same value
(pluralize count singular & [plural])
Attempts to pluralize the word unless count is 1. If plural is supplied, it will use that when count is > 1, otherwise it will use the inflector to determine the plural form.
Attempts to pluralize the word unless count is 1. If plural is supplied, it will use that when count is > 1, otherwise it will use the inflector to determine the plural form.
(reset-rules! rules)
Resets the list of plural rules.
Resets the list of plural rules.
(resolve-rule rule word)
(resolve-rules rules word)
(singular! & patterns-and-replacements)
Define rule(s) to map words from singular to plural.
Examples: (singular! #"(n)ews$(?i)" "$1ews") (singular! #"(m)ovies$(?i)" "$1ovie" #"([m|l])ice$(?i)" "$1ouse")
Define rule(s) to map words from singular to plural. Examples: (singular! #"(n)ews$(?i)" "$1ews") (singular! #"(m)ovies$(?i)" "$1ovie" #"([m|l])ice$(?i)" "$1ouse")
(singular? s)
Returns true if calling singular on a value returns the same value
Returns true if calling singular on a value returns the same value
(slurp-rules & patterns-and-replacements)
Returns a seq of rules, where the pattern and replacement must be given in pairs of two elements.
Returns a seq of rules, where the pattern and replacement must be given in pairs of two elements.
(str-name x)
Same as clojure.core/name
, but keeps the namespace for keywords
and symbols.
Same as `clojure.core/name`, but keeps the namespace for keywords and symbols.
(uncountable? x)
Returns true if x
is uncountable, otherwise false.
Returns true if `x` is uncountable, otherwise false.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close