chore: README.md update for Acronym

This commit is contained in:
Roshan Ranabhat 2023-01-20 11:05:43 +05:45
parent 0127cca768
commit 103d950d1d
2 changed files with 11 additions and 2 deletions

View File

@ -54,7 +54,7 @@ Convert string to camel case, snake case, kebab case / slugify, custom delimiter
</tr>
<tr>
<td><a href="#suffixstring-string">Suffix</a></td>
<td></td>
<td><a href="#acronym-string">Acronym</a></td>
<td></td>
</tr>
</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
``` bash

View File

@ -82,6 +82,5 @@ func main() {
fmt.Println(pun.Suffix("hanger")) // this really is a cliffhanger
acronym := stringy.New("Laugh Out Loud")
// fmt.Println(acronym.Acronym().Get()) // LOL
fmt.Println(acronym.Acronym().ToLower()) // lol
}