Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnglishPlural ¶
type EnglishPlural struct {
// contains filtered or unexported fields
}
EnglishPlural defines methods and rules for getting plural form of a word for English
func EnglishPluralization ¶
func EnglishPluralization() *EnglishPlural
EnglishPluralization returns EnglishPlural instance
func (*EnglishPlural) AddIrregular ¶
func (ep *EnglishPlural) AddIrregular(singularWord, pluralWord string)
AddIrregular add regex rule for holding plural rule
func (*EnglishPlural) AddPluralRegex ¶
func (ep *EnglishPlural) AddPluralRegex(matcherReg, replacerWord string)
AddPluralRegex add regex rule for holding plural rule
func (*EnglishPlural) AddUncountable ¶
func (ep *EnglishPlural) AddUncountable(uncountable string)
AddUncountable adds uncountable word
func (*EnglishPlural) Plural ¶
func (ep *EnglishPlural) Plural(word string) string
Plural returns plural form of a word
Click to show internal directories.
Click to hide internal directories.