casing

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Original       = iota
	LowerCase      = iota
	UpperCase      = iota
	CamelCase      = iota
	TitleCase      = iota
	SnakeCase      = iota
	KebabCase      = iota
	UpperSnakeCase = iota
	UpperKebabCase = iota
)

Types of casing

Variables

This section is empty.

Functions

This section is empty.

Types

type Casing

type Casing uint8

Casing type

func DetermineCasing

func DetermineCasing(s string) Casing

DetermineCasing determines a strings casing

type Variant

type Variant struct {
	Casing Casing
	Value  string
}

Variant represents a string in a different casing variant.

type Variants

type Variants []Variant

Variants contains variations of a string in different casings.

func GenerateCasings

func GenerateCasings(s string) Variants

GenerateCasings generates casings for the specified string

func (Variants) GetVariant

func (variants Variants) GetVariant(casing Casing) Variant

GetVariant returns the variant for the specified casing.

Jump to

Keyboard shortcuts

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