Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

Package inflect can pluralize ("cat" => "cats", "man" => "men") or singularize ("cats" => "cat", "men" => "man") English language nouns.

API docs are here.

Usage:

import "github.com/kjk/inflect"

inflect.ToPlural("man") // "men"
inflect.ToPlural("men") // "men"

inflect.ToSingular("men") // "man"
inflect.ToSingular("man") // "man"

inflect.IsPlural("cats") // true
inflect.IsPlural("cat")  // false

inflect.IsSingular("cat")  // true
inflect.IsSingular("cats") // false

This is a Go port of https://github.com/blakeembrey/pluralize

About

Go library to pluralize and singularize English nouns ("cat" <=> "cats" etc.)

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Languages