Skip to content

Commit 7681635

Browse files
committed
update readme with correct example
1 parent 286f94c commit 7681635

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,26 @@ go get github.com/gomantics/sx
1616
package main
1717

1818
import (
19-
"fmt"
19+
"fmt"
2020

21-
"github.com/gomantics/sx"
21+
"github.com/gomantics/sx"
2222
)
2323

2424
func main() {
25-
// Convert to different cases
26-
fmt.Println(sx.CamelCase("hello-world")) // helloWorld
27-
fmt.Println(sx.PascalCase("hello_world")) // HelloWorld
28-
fmt.Println(sx.KebabCase("HelloWorld")) // hello-world
29-
fmt.Println(sx.SnakeCase("HelloWorld")) // hello_world
30-
fmt.Println(sx.TrainCase("hello-world")) // Hello-World
31-
fmt.Println(sx.FlatCase("hello-world")) // helloworld
32-
33-
// Works with mixed separators and cases
34-
fmt.Println(sx.CamelCase("mixed_caseWith-different.separators")) // mixedCaseWithDifferentSeparators
35-
36-
// Handle complex acronyms
37-
fmt.Println(sx.KebabCase("XMLHttpRequest")) // xml-http-request
38-
fmt.Println(sx.CamelCase("HTML5Parser")) // html5Parser
25+
// Convert to different cases
26+
fmt.Println(sx.CamelCase("hello-world")) // helloWorld
27+
fmt.Println(sx.PascalCase("hello_world")) // HelloWorld
28+
fmt.Println(sx.KebabCase("HelloWorld")) // hello-world
29+
fmt.Println(sx.SnakeCase("HelloWorld")) // hello_world
30+
fmt.Println(sx.TrainCase("hello-world")) // Hello-World
31+
fmt.Println(sx.FlatCase("hello-world")) // helloworld
32+
33+
// Works with mixed separators and cases
34+
fmt.Println(sx.CamelCase("mixed_caseWith-different.separators")) // mixedCaseWithDifferentSeparators
35+
36+
// Handle complex acronyms
37+
fmt.Println(sx.KebabCase("XMLHttpRequest")) // xml-http-request
38+
fmt.Println(sx.CamelCase("HTML5Parser", sx.WithNormalize(true))) // html5Parser
3939
}
4040
```
4141

0 commit comments

Comments
 (0)