casing

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommonAcronyms = map[string]string{
	"id":    "ID",
	"api":   "API",
	"http":  "HTTP",
	"https": "HTTPS",
	"url":   "URL",
	"uri":   "URI",
	"uuid":  "UUID",
	"sql":   "SQL",
	"json":  "JSON",
	"xml":   "XML",
	"html":  "HTML",
	"css":   "CSS",
	"rpc":   "RPC",
	"rest":  "REST",
	"tcp":   "TCP",
	"udp":   "UDP",
	"ip":    "IP",
	"db":    "DB",
	"ui":    "UI",
	"ux":    "UX",
	"io":    "IO",
	"os":    "OS",
	"cpu":   "CPU",
	"gpu":   "GPU",
	"ram":   "RAM",
	"ascii": "ASCII",
	"utf":   "UTF",
	"oauth": "OAuth",
	"jwt":   "JWT",
	"ssl":   "SSL",
	"tls":   "TLS",
	"ssh":   "SSH",
	"ftp":   "FTP",
	"dns":   "DNS",
	"smtp":  "SMTP",
	"imap":  "IMAP",
	"pop":   "POP",
	"grpc":  "GRPC",
	"cors":  "CORS",
	"csrf":  "CSRF",
	"xss":   "XSS",
}

CommonAcronyms is a lookup table of commonly used acronyms that should be uppercased

Functions

func SplitWords

func SplitWords(s string) []string

SplitWords splits a string into words based on delimiters and case transitions

func ToCamelCase

func ToCamelCase(s string) string

ToCamelCase converts a string to camelCase with proper acronym handling

func ToKebabCase

func ToKebabCase(s string) string

ToKebabCase converts a string to kebab-case

func ToPascalCase

func ToPascalCase(s string) string

ToPascalCase converts a string to PascalCase with proper acronym handling

func ToSnakeCase

func ToSnakeCase(s string) string

ToSnakeCase converts a string to snake_case

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL