pluralize

package
v1.4.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Has

func Has(size int) string

Has returns the either the singular or plural version of the verb "to have" based on the `size` input.

func Pluralize

func Pluralize(size int, word string, arg ...string) string

- If the provided argument contains a comma, use the text before the comma for the singular case and the text after the comma for the plural case: - If value is 0, cand{{ value|pluralize:"y,ies" }} display "candies". - If value is 1, cand{{ value|pluralize:"y,ies" }} display "candy". - If value is 2, cand{{ value|pluralize:"y,ies" }} display "candies".

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL