@@ -16,26 +16,26 @@ go get github.com/gomantics/sx
1616package main
1717
1818import (
19- " fmt"
19+ " fmt"
2020
21- " github.com/gomantics/sx"
21+ " github.com/gomantics/sx"
2222)
2323
2424func 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