inflector
inflector copied to clipboard
Doctrine Inflector is a small library that can perform string manipulations with regard to uppercase/lowercase and singular/plural forms of words.
The plural of `stadium` should be `stadiums` and not `stadia`.
Example from Laravel for ease of use: Current: > Str::singular('nurseries'); = "nurseries" Expected: > Str::singular('nurseries'); = "nursery"
Conclude what was left pending in this PR: https://github.com/doctrine/inflector/pull/197 The commit adds the Italian language as per the rules.
Using Laravel for this, but it uses Inflector under the hood. ``` > Str::plural('addendum') = "addendums" // should be `addenda` > Str::singular('addenda') = "addenda" // should be `addendum` ```
Fixes #232
Example from Laravel for ease of use: Current: ```php > Str::plural('die', 2); = "dies" > Str::singular('dice'); = "dice" ``` Expected: ```php > Str::plural('die', 2); = "dice" > Str::singular('dice'); = "die"...
https://dictionary.cambridge.org/dictionary/english/alga
The singular of `raves` should be `rave` and not `rafe`.
I would like to raise a problem here that adding a bunch of words to the "uninflected" list is kind of odd to include in a patch version. The problem...