Skip to content

Commit

Permalink
More ReadMe fun
Browse files Browse the repository at this point in the history
  • Loading branch information
mrapplexz committed Jun 2, 2019
1 parent e84b855 commit 89f1034
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,34 @@ Multiplatform Kotlin library to convert strings between various case formats
- Title Case
- lower space case
- UPPER.DOT.CASE
- dot.case
- dot.case

# Setup
1. Add the lib to your project's dependencies by copying one of the following lines depending on the platform:
- Groovy (replace `$kasechange_version` with the version you want):
```groovy
implementation "net.pearx.kasechange:kasechange-metadata:$kasechange_version" // for Common
// or
implementation "net.pearx.kasechange:kasechange-jvm:$kasechange_version" // for JVM
// or
implementation "net.pearx.kasechange:kasechange-js:$kasechange_version" // for JS
```
- Kotlin (replace `$kasechangeVersion` with the version you want):
```kotlin
"implementation"("net.pearx.kasechange:kasechange-metadata:$kasechangeVersion") // for Common
// or
"implementation"("net.pearx.kasechange:kasechange-jvm:$kasechangeVersion") // for JVM
// or
"implementation"("net.pearx.kasechange:kasechange-js:$kasechangeVersion") // for JS
```
2. Use the library and have fun!
# Examples:
- Transforming string from one case to another:
```kotlin
"IAmAPascalCasedString".toSnakeCase() // i_am_a_pascal_cased_string
"IAmAPascalCasedString".toCase(CaseFormat.LOWER_UNDERSCORE) // i_am_a_pascal_cased_string
```
- Splitting a string into words:
```kotlin
"XMLExtendedParser".spitToWords() // [XML, Extended, Parser]
```

0 comments on commit 89f1034

Please sign in to comment.