File: README.md

package info (click to toggle)
golang-github-gedex-inflector 0.0~git20170307.0.16278e9-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 88 kB
  • sloc: makefile: 2
file content (25 lines) | stat: -rw-r--r-- 897 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Inflector
=========

Inflector pluralizes and singularizes English nouns.

[![Build Status](https://travis-ci.org/gedex/inflector.png?branch=master)](https://travis-ci.org/gedex/inflector)
[![Coverage Status](https://coveralls.io/repos/gedex/inflector/badge.png?branch=master)](https://coveralls.io/r/gedex/inflector?branch=master)
[![GoDoc](https://godoc.org/github.com/gedex/inflector?status.svg)](https://godoc.org/github.com/gedex/inflector)

## Basic Usage

There are only two exported functions: `Pluralize` and `Singularize`.

~~~go
fmt.Println(inflector.Singularize("People")) // will print "Person"
fmt.Println(inflector.Pluralize("octopus")) // will print "octopuses"
~~~

## Credits

* [CakePHP's Inflector](https://github.com/cakephp/cakephp/blob/master/lib/Cake/Utility/Inflector.php)

## License

This library is distributed under the BSD-style license found in the LICENSE.md file.