casing

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package casing converts identifier strings between common casing styles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Camel added in v0.9.0

func Camel(s string) string

Camel converts a kebab-case, snake_case, PascalCase, or dotted string into camelCase: the first word lowercased, each later word capitalized (api-endpoint -> apiEndpoint, int8-flag -> int8Flag).

func Kebab

func Kebab(s string) string

Kebab converts a CamelCase, PascalCase, snake_case, or dotted string into kebab-case.

func Snake

func Snake(s string) string

Snake converts a CamelCase, PascalCase, kebab-case, or dotted string into snake_case.

func UpperSnake

func UpperSnake(s string) string

UpperSnake converts a CamelCase, PascalCase, kebab-case, or dotted string into UPPER_SNAKE_CASE.

func UppercaseWords

func UppercaseWords(s string) string

UppercaseWords converts a CamelCase word into uppercase, dash-separated tokens, grouping acronyms (HTTPMethod -> HTTP-METHOD, ExistingFile -> EXISTING-FILE).

Types

This section is empty.

Jump to

Keyboard shortcuts

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