casec: github.com/mingrammer/casec Index | Files

package casec

import "github.com/mingrammer/casec"

Index

Package Files

case.go convert.go

Constants

const (
    SnakeDelimiter = '_'
    KebabDelimiter = '-'
)

Case-specific delimiter

func Invert Uses

func Invert(s string) string

Invert inverts the UPPERCASE to lowercase and vice versa

func IsCamel Uses

func IsCamel(s string) bool

IsCamelCase checks the string is camelcase

func IsCaseOf Uses

func IsCaseOf(c, s string) (bool, error)

IsCaseOf checks whether the string is a specific case

func IsKebab Uses

func IsKebab(s string) bool

IsKebabCase checks the string is kebabcase

func IsLower Uses

func IsLower(s string) bool

IsLowerCase checks the string is lowercase

func IsPascal Uses

func IsPascal(s string) bool

IsPascalCase checks the string is pascalcase

func IsSnake Uses

func IsSnake(s string) bool

IsSnakeCase checks the string is snakecase

func IsTitle Uses

func IsTitle(s string) bool

IsTitleCase checks the string is titlecase

func IsUpper Uses

func IsUpper(s string) bool

IsUpperCase checks the string is uppercase

func ToCamel Uses

func ToCamel(s string) string

ToCamelCase converts the string to camelcase Use strings.Map?

func ToCaseFor Uses

func ToCaseFor(c, s string) (string, error)

ToCaseFor converts the string to specific case

func ToKebab Uses

func ToKebab(s string) string

ToKebabCase converts the string to kebabcase

func ToLower Uses

func ToLower(s string) string

ToLowerCase converts the string to lowercase

func ToPascal Uses

func ToPascal(s string) string

ToPascalCase converts the string to pascalcase

func ToSnake Uses

func ToSnake(s string) string

ToSnakeCase converts the string to snakecase

func ToTitle Uses

func ToTitle(s string) string

ToTitleCase converts the string to titlecase

func ToUpper Uses

func ToUpper(s string) string

ToUpperCase converts the string to uppercase

Package casec imports 5 packages (graph). Updated 2019-02-19. Refresh now. Tools for package owners.