stringcase

package
v0.30.17 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CamelCase  = "camelCase"
	KebabCase  = "kebab-case"
	PascalCase = "PascalCase"
	SnakeCase  = "snake_case"
)

Variables

This section is empty.

Functions

func CaseKebabToCamel added in v0.26.2

func CaseKebabToCamel(s string) string

func CaseKebabToPascal added in v0.26.2

func CaseKebabToPascal(s string) string

func CaseKebabToSnake added in v0.26.2

func CaseKebabToSnake(s string) string

func CaseSnakeToCamel added in v0.26.2

func CaseSnakeToCamel(s string) string

func CaseSnakeToKebab added in v0.26.2

func CaseSnakeToKebab(s string) string

func CaseSnakeToPascal added in v0.26.2

func CaseSnakeToPascal(s string) string

func IsCamelCase

func IsCamelCase(input string) bool

IsCamelCase returns if a string is camelCase or not.

func IsCase

func IsCase(caseType, s string) (bool, error)

func IsFirstAlphaUpper

func IsFirstAlphaUpper(s string) bool

IsFirstAlphaUpper returns if the first character is a capital [A-Z] character.

func IsKebabCase added in v0.0.25

func IsKebabCase(input string) bool

func IsPascalCase

func IsPascalCase(input string) bool

IsPascalCase returns if a string is PascalCase or not.

func IsSnakeCase added in v0.0.25

func IsSnakeCase(input string) bool

func Parse added in v0.25.3

func Parse(s string) (string, error)

func ToCamelCase added in v0.26.2

func ToCamelCase(s string) string

ToCamelCase converts a string to camel case as `camelCase`.

func ToPascalCase added in v0.26.2

func ToPascalCase(s string) string

ToPascalCase converts a string to Pascal case as `PascalCase`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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