mirror of https://github.com/gobeam/stringy.git
chore: README.md update for Acronym
This commit is contained in:
parent
0127cca768
commit
103d950d1d
12
README.md
12
README.md
|
@ -54,7 +54,7 @@ Convert string to camel case, snake case, kebab case / slugify, custom delimiter
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="#suffixstring-string">Suffix</a></td>
|
<td><a href="#suffixstring-string">Suffix</a></td>
|
||||||
<td></td>
|
<td><a href="#acronym-string">Acronym</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -357,6 +357,16 @@ Suffix makes sure string has been suffixed with a given string and avoids adding
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### Acronym() string
|
||||||
|
|
||||||
|
Acronym func returns acronym of input string. You can chain ToUpper() which with make result all upercase or ToLower() which will make result all lower case or Get which will return result as it is
|
||||||
|
|
||||||
|
```go
|
||||||
|
acronym := stringy.New("Laugh Out Loud")
|
||||||
|
fmt.Println(acronym.Acronym().ToLower()) // lol
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Running the tests
|
## Running the tests
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
|
|
|
@ -82,6 +82,5 @@ func main() {
|
||||||
fmt.Println(pun.Suffix("hanger")) // this really is a cliffhanger
|
fmt.Println(pun.Suffix("hanger")) // this really is a cliffhanger
|
||||||
|
|
||||||
acronym := stringy.New("Laugh Out Loud")
|
acronym := stringy.New("Laugh Out Loud")
|
||||||
// fmt.Println(acronym.Acronym().Get()) // LOL
|
|
||||||
fmt.Println(acronym.Acronym().ToLower()) // lol
|
fmt.Println(acronym.Acronym().ToLower()) // lol
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue