Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CommonInitialisms = map[string]bool{ "acl": true, "api": true, "ascii": true, "cpu": true, "css": true, "dns": true, "eof": true, "guid": true, "html": true, "http": true, "https": true, "id": true, "ip": true, "json": true, "lhs": true, "qps": true, "ram": true, "rhs": true, "rpc": true, "sla": true, "smtp": true, "sql": true, "ssh": true, "tcp": true, "tls": true, "ttl": true, "udp": true, "ui": true, "uid": true, "uuid": true, "uri": true, "url": true, "utf8": true, "vm": true, "xml": true, "xmpp": true, "xsrf": true, "xss": true, }
Functions ¶
func SplitIntoWords ¶
func ToLowerCamel ¶
Example ¶
fmt.Println(strcase.ToLowerCamel("lowerCamel")) fmt.Println(strcase.ToLowerCamel("UpperCamel")) fmt.Println(strcase.ToLowerCamel("lower_snake")) fmt.Println(strcase.ToLowerCamel("UPPER_SNAKE"))
Output: lowerCamel upperCamel lowerSnake upperSnake
func ToLowerSnake ¶
Example ¶
fmt.Println(strcase.ToLowerSnake("lowerCamel")) fmt.Println(strcase.ToLowerSnake("UpperCamel")) fmt.Println(strcase.ToLowerSnake("lower_snake")) fmt.Println(strcase.ToLowerSnake("UPPER_SNAKE"))
Output: lower_camel upper_camel lower_snake upper_snake
func ToUpperCamel ¶
Example ¶
fmt.Println(strcase.ToUpperCamel("lowerCamel")) fmt.Println(strcase.ToUpperCamel("UpperCamel")) fmt.Println(strcase.ToUpperCamel("lower_snake")) fmt.Println(strcase.ToUpperCamel("UPPER_SNAKE"))
Output: LowerCamel UpperCamel LowerSnake UpperSnake
func ToUpperSnake ¶
Example ¶
fmt.Println(strcase.ToUpperSnake("lowerCamel")) fmt.Println(strcase.ToUpperSnake("UpperCamel")) fmt.Println(strcase.ToUpperSnake("lower_snake")) fmt.Println(strcase.ToUpperSnake("UPPER_SNAKE"))
Output: LOWER_CAMEL UPPER_CAMEL LOWER_SNAKE UPPER_SNAKE
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.