Skip to content

Commit

Permalink
chore: README.md update for Acronym
Browse files Browse the repository at this point in the history
  • Loading branch information
gobeam committed Jan 20, 2023
1 parent 0127cca commit 103d950
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 103d950

Please sign in to comment.