plural

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2018 License: MIT Imports: 3 Imported by: 0

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

Jump to

Keyboard shortcuts

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