mirror of
https://github.com/ethauvin/kotlin-pluralizer.git
synced 2025-04-25 00:37:12 -07:00
updated readme
This commit is contained in:
parent
acf66ae704
commit
e579f7bfe1
1 changed files with 22 additions and 15 deletions
37
README.md
37
README.md
|
@ -3,43 +3,50 @@
|
|||
|
||||
**kotlin extension** to **pluralize** and **singularize** strings
|
||||
|
||||
[](https://travis-ci.org/cesarferreira/kotlin-pluralizer) [](https://jitpack.io/#cesarferreira/kkotlin-pluralizer) [  ](https://bintray.com/cesarferreira/maven/kotlin-pluralizer/_latestVersion)
|
||||
[](https://travis-ci.org/cesarferreira/kotlin-pluralizer) [](https://jitpack.io/#cesarferreira/kkotlin-pluralizer)
|
||||
|
||||
### Show some love
|
||||
[](https://github.com/cesarferreira/kotlin-pluralizer) [](https://twitter.com/cesarmcferreira)
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
**Pluralization:**
|
||||
|
||||
```kotlin
|
||||
"person".pluralize() # => "people"
|
||||
"post".pluralize() # => "posts"
|
||||
"sheep".pluralize() # => "sheep"
|
||||
"foot".pluralize() # => "feet"
|
||||
"person".pluralize() # => "people"
|
||||
"post".pluralize() # => "posts"
|
||||
"sheep".pluralize() # => "sheep"
|
||||
"foot".pluralize() # => "feet"
|
||||
```
|
||||
|
||||
**Singuralization:**
|
||||
|
||||
```kotlin
|
||||
"words".singularize() # => "word"
|
||||
"octopi".singularize() # => "octopus"
|
||||
"people".singularize() # => "person"
|
||||
"feet".singularize() # => "foot"
|
||||
"words".singularize() # => "word"
|
||||
"octopi".singularize() # => "octopus"
|
||||
"people".singularize() # => "person"
|
||||
"feet".singularize() # => "foot"
|
||||
```
|
||||
|
||||
**Quantities:**
|
||||
```kotlin
|
||||
"person".pluralize(1) # => "person"
|
||||
"person".pluralize(2) # => "people"
|
||||
```
|
||||
|
||||
## Install
|
||||
|
||||
```groovy
|
||||
repositories {
|
||||
jcenter()
|
||||
maven { url "https://jitpack.io" }
|
||||
jcenter()
|
||||
maven { url "https://jitpack.io" }
|
||||
}
|
||||
dependencies {
|
||||
compile 'com.github.cesarferreira:kotlin-pluralizer:0.2.4'
|
||||
compile 'com.github.cesarferreira:kotlin-pluralizer:0.2.6'
|
||||
}
|
||||
```
|
||||
|
||||
## Show some love
|
||||
[](https://github.com/cesarferreira/kotlin-pluralizer) [](https://twitter.com/cesarmcferreira)
|
||||
|
||||
## 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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue