Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CamelCase ¶
Converts input string to "camelCase" (lower camel case) naming convention. Removes all whitespace and special characters. Supports Unicode characters.
Example ¶
package main import ( "fmt" "github.com/golang-cz/textcase" ) func main() { fmt.Println(textcase.CamelCase("Hello World!")) }
Output: helloWorld
func KebabCase ¶ added in v1.1.0
Converts input string to "kebab-case" naming convention. Removes all whitespace and special characters. Supports Unicode characters.
Example ¶
package main import ( "fmt" "github.com/golang-cz/textcase" ) func main() { fmt.Println(textcase.KebabCase("Hello World!")) }
Output: hello-world
func PascalCase ¶
Converts input string to "PascalCase" (upper camel case) naming convention. Removes all whitespace and special characters. Supports Unicode characters.
Example ¶
package main import ( "fmt" "github.com/golang-cz/textcase" ) func main() { fmt.Println(textcase.PascalCase("Hello World!")) }
Output: HelloWorld
func SnakeCase ¶
Converts input string to "snake_case" naming convention. Removes all whitespace and special characters. Supports Unicode characters.
Example ¶
package main import ( "fmt" "github.com/golang-cz/textcase" ) func main() { fmt.Println(textcase.SnakeCase("Hello World!")) }
Output: hello_world
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.