Usage
Example Usage:
> (use-package :vana-inflector)
> (let ((dollars 1.7)
(users 34)
(purchases 1))
(format nil "The site has ~D ~A, with a total of ~D ~A and $~D ~A"
users (pluralize users "user")
purchases (pluralize purchases "purchase")
dollars (pluralize dollars "dollar")))
"The site has 34 users, with a total of 1 purchase and $1.7 dollars"
Basic Usage, plural-of
and singular-of
:
> (plural-of "octopus")
"octopuses"
> (plural-of "datum")
"data"
> (singular-of "children")
"child"
> (singular-of "cats")
"cat"
> (singular-of "data")
"datum"
Basic Usage, pluralize
:
> (pluralize 2 "virus")
"viri"
> (pluralize 1 "virus")
"virus"
vana-inflector CL source code.
Topics: Text