common

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WORDS = []string{
	"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten",
	"eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen", "twenty",
}

Functions

func CamelLowerCase

func CamelLowerCase(s string) string

CamelCase returns a string representation of the value in CamelCase.

func CamelTitleCase

func CamelTitleCase(s string) string

CamelTitleCase returns a string representation of the value in CamelTitleCase.

func CamelUpperCase

func CamelUpperCase(s string) string

CamelUpperCase returns a string representation of the value in CamelCase.

func DotLowerCase

func DotLowerCase(s string) string

DotLowerCase returns a string representation of the value in dot.case

func DotTitleCase

func DotTitleCase(s string) string

DotTitleCase returns a string representation of the value in dot.case

func DotUpperCase

func DotUpperCase(s string) string

DotUpperCase returns a string representation of the value in DOT.CASE

func FirstChar

func FirstChar(s string) string

FirstChar returns the first character of the value.

func FirstCharLower

func FirstCharLower(s string) string

FirstCharLower returns the first character of the value in lowercase.

func FirstCharUpper

func FirstCharUpper(s string) string

FirstCharUpper returns the first character of the value in UPPER CASE.

func IntToWord

func IntToWord(i int, prefix string, postfix string, wc strcase.WordCase) string

func IntToWordLower

func IntToWordLower(i int, prefix string, postfix string) string

func IntToWordTitle

func IntToWordTitle(i int, prefix string, postfix string) string

func IntToWordUpper

func IntToWordUpper(i int, prefix string, postfix string) string

func Join

func Join(sep string, a []string) string

func KebabLowerCase

func KebabLowerCase(s string) string

KebabLowerCase returns a string representation of the value in kebap-case.

func KebabTitleCase

func KebabTitleCase(s string) string

KebabTitleCase returns a string representation of the value in kebab-case.

func KebabUpperCase

func KebabUpperCase(s string) string

KebapCaseUpper returns a string representation of the value in KEBAP-CASE.

func LowerCase

func LowerCase(s string) string

LowerCase returns a string representation of the value in lowercase.

func LowerFirst

func LowerFirst(s string) string

LowerFirst returns a string representation of the value with the first character in lowercase.

func NewLine

func NewLine() string

func PathLowerCase

func PathLowerCase(s string) string

PathLowerCase returns a string representation of the value in path/case.

func PathTitleCase

func PathTitleCase(s string) string

PathTitleCase returns a string representation of the value in path/case.

func PathUpperCase

func PathUpperCase(s string) string

PathUpperCase returns a string representation of the value in PATH/CASE.

func Pluralize

func Pluralize(s string, i int) string

func Replace

func Replace(s, old, new string) string

func SnakeCaseLower

func SnakeCaseLower(s string) string

SnakeCaseLower returns a string representation of the value in snake_case.

func SnakeTitleCase

func SnakeTitleCase(s string) string

SnakeTitleCase returns a string representation of the value in snake_case.

func SnakeUpperCase

func SnakeUpperCase(s string) string

First returns the first character of the value.

func TrimPrefix

func TrimPrefix(s, prefix string) string

func TrimSuffix

func TrimSuffix(s, postfix string) string

func UpperCase

func UpperCase(s string) string

UpperCase returns a string representation of the value in UPPER CASE.

func UpperFirst

func UpperFirst(s string) string

UpperFirst returns a string representation of the value with the first character in UPPER CASE.

Types

This section is empty.

Jump to

Keyboard shortcuts

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