text

package
v2.0.0-...-10e4721 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func FromHTML

func FromHTML(html string) string

func KebabCase

func KebabCase(s string) string

KebabCase converts a string into kebab case.

func LowerCamelCase

func LowerCamelCase(s string) string

LowerCamelCase converts a string into camel case starting with a lower case letter.

func Match

func Match(input, pattern string) bool

func ParseWildCard

func ParseWildCard(input, expr string) []string

func Random

func Random(length int) string

func Sanitize

func Sanitize()

func Slugify

func Slugify(text string) string

func SnakeCase

func SnakeCase(s string) string

SnakeCase converts a string into snake case.

func SplitAny

func SplitAny(s string, seps string) []string

func ToJSON

func ToJSON(v any) string

func UpperCamelCase

func UpperCamelCase(s string) string

UpperCamelCase converts a string into camel case starting with a upper case letter.

func UpperKebabCase

func UpperKebabCase(s string) string

UpperKebabCase converts a string into kebab case with capital letters.

func UpperSnakeCase

func UpperSnakeCase(s string) string

UpperSnakeCase converts a string into snake case with capital letters.

Types

type Allowed

type Allowed *regexp.Regexp
var (
	Alpha   Allowed = regexp.MustCompile(`([a-zA-Z\s])`)
	Numeric Allowed = regexp.MustCompile(`([0-9])`)
	Decimal Allowed = regexp.MustCompile(`^[+-]?([0-9]*[.])?[0-9]+$`)
)

Jump to

Keyboard shortcuts

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