Function: projectile--pluralize

projectile--pluralize is a byte-compiled function defined in projectile.el.

Signature

(projectile--pluralize WORD)

Documentation

Naively pluralize the English noun WORD.

The mirror of projectile--singularize, handling only the regular cases: a consonant followed by -y becomes -ies, an -s/-x/-z/-ch/-sh ending gains -es, and everything else gains -s. Irregular nouns are not handled.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--pluralize (word)
  "Naively pluralize the English noun WORD.

The mirror of `projectile--singularize', handling only the regular
cases: a consonant followed by -y becomes -ies, an -s/-x/-z/-ch/-sh
ending gains -es, and everything else gains -s.  Irregular nouns are not
handled."
  (cond
   ((string-match-p "[^aeiou]y\\'" word)
    (concat (substring word 0 -1) "ies"))
   ((string-match-p "\\(s\\|x\\|z\\|ch\\|sh\\)\\'" word)
    (concat word "es"))
   (t (concat word "s"))))