Documentation ¶
Index ¶
- Variables
- func FromHTML(html string) string
- func KebabCase(s string) string
- func LowerCamelCase(s string) string
- func Match(input, pattern string) bool
- func ParseWildCard(input, expr string) []string
- func Random(length int) string
- func Sanitize()
- func Slugify(text string) string
- func SnakeCase(s string) string
- func SplitAny(s string, seps string) []string
- func ToJSON(v any) string
- func UpperCamelCase(s string) string
- func UpperKebabCase(s string) string
- func UpperSnakeCase(s string) string
- type Allowed
Constants ¶
This section is empty.
Variables ¶
View Source
var SAFE = []*unicode.RangeTable{ unicode.Letter, unicode.Number, }
View Source
var SKIP = []*unicode.RangeTable{ unicode.Mark, unicode.Sk, unicode.Lm, }
Functions ¶
func LowerCamelCase ¶
LowerCamelCase converts a string into camel case starting with a lower case letter.
func ParseWildCard ¶
func UpperCamelCase ¶
UpperCamelCase converts a string into camel case starting with a upper case letter.
func UpperKebabCase ¶
UpperKebabCase converts a string into kebab case with capital letters.
func UpperSnakeCase ¶
UpperSnakeCase converts a string into snake case with capital letters.
Types ¶
type Allowed ¶
var ( Alpha Allowed = regexp.MustCompile(`([a-zA-Z\s])`) Numeric Allowed = regexp.MustCompile(`([0-9])`) Decimal Allowed = regexp.MustCompile(`^[+-]?([0-9]*[.])?[0-9]+$`) )
Click to show internal directories.
Click to hide internal directories.