mirror of
https://github.com/ethauvin/kotlin-pluralizer.git
synced 2025-04-25 00:37:12 -07:00
3.2 KiB
3.2 KiB
Kotlin-pluralizer
Kotlin extension to pluralize and singularize strings!
Specs
Show some ❤️
Partikular ksingle specialK specifik
Usage
"person".pluralize() # => "people"
"post".pluralize() # => "posts"
"octopus".pluralize() # => "octopi"
"sheep".pluralize() # => "sheep"
"words".pluralize() # => "words"
"CamelOctopus".pluralize() # => "CamelOctopi"
Install
TODO
Contributing
I welcome and encourage all pull requests. It usually will take me within 24-48 hours to respond to any issue or request. Here are some basic rules to follow to ensure timely addition of your request:
- Match coding style (braces, spacing, etc.) This is best achieved using
CMD
+Option
+L
(Reformat code) on Mac (not sure for Windows) with Android Studio defaults. - If its a feature, bugfix, or anything please only change code to what you specify.
- Please keep PR titles easy to read and descriptive of changes, this will make them easier to merge :)
- Pull requests must be made against
develop
branch. Any other branch (unless specified by the maintainers) will get rejected. - Check for existing issues first, before filing an issue.
- Have fun!
## Credits
The pluralize and singularize methods are based on the code found in the following places.
- https://github.com/atteo/evo-inflector/blob/master/src/main/java/org/atteo/evo/inflector/English.java
- http://www.java2s.com/Tutorial/Java/0040__Data-Type/Transformswordstosingularpluralhumanizedhumanreadableunderscorecamelcaseorordinalform.htm
26698fb91d/activesupport/lib/active_support/inflector/inflections.rb