https://github.com/aacfactory/cases
string case formatter
https://github.com/aacfactory/cases
Last synced: 5 months ago
JSON representation
string case formatter
- Host: GitHub
- URL: https://github.com/aacfactory/cases
- Owner: aacfactory
- License: apache-2.0
- Created: 2021-12-10T09:00:51.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-06T16:11:15.000Z (over 4 years ago)
- Last Synced: 2024-06-30T12:43:40.001Z (almost 2 years ago)
- Language: Go
- Size: 15.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cases
String case formatter for Golang
## Install
```shell
go get github.com/aacfactory/cases
```
## Camel
```go
c := Camel()
atoms, err := c.Parse("FooBar")
result := c.Format([]string{"foo", "bar"})
```
## Snake
```go
c := Snake()
atoms, err := c.Parse("foo_bar")
result := c.Format([]string{"foo", "bar"})
```
## Kebab
```go
c := Kebab()
atoms, err := c.Parse("foo-bar")
result := c.Format([]string{"foo", "bar"})
```
## Qualified
```go
c := Qualified()
atoms, err := c.Parse("foo.bar")
result := c.Format([]string{"foo", "bar"})
```