str

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 13 Imported by: 35

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IPReg, _ = regexp.Compile(`^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$`)
View Source
var MailReg, _ = regexp.Compile(`\w[-._\w]*@\w[-._\w]*\.\w+`)

Functions

func Base64Decode

func Base64Decode(str string) (string, error)

base64 decode

func Base64Encode

func Base64Encode(str string) string

base64 encode

func Dangerous

func Dangerous(s string) bool

func IdsInt64

func IdsInt64(ids string, sep ...string) []int64

func IdsString

func IdsString(ids []int64, sep ...string) string

func IsEmpty

func IsEmpty(str string) bool

IsEmpty returns a boolean of s equal "" or len(s) == 0

func IsIP

func IsIP(s string) bool

func IsIdentifier

func IsIdentifier(s string, pattern ...string) bool

func IsMail

func IsMail(s string) bool

func IsMatch

func IsMatch(s, pattern string) bool

func IsPhone

func IsPhone(s string) bool

func KeysOfMap

func KeysOfMap(m map[string]string) []string

func MD5

func MD5(str string) string

func MtoL

func MtoL(m map[string]struct{}) []string

func ParseComma

func ParseComma(str string) []string

func ParseCommaTrim

func ParseCommaTrim(str string) []string

func ParseLines

func ParseLines(lines string) []string

func RandDigits

func RandDigits(n int) string

func RandLetters

func RandLetters(n int) string

func Repeat

func Repeat(str string, count int) string

Repeat returns a new string consisting of count copies of the string str

func Reverse

func Reverse(str string) string

Reverse reverse a string

func ToENSymbol

func ToENSymbol(raw string) string

func ToLower

func ToLower(str string) string

ToLower convert a string to lowercase

func ToTitle

func ToTitle(str string) string

ToTitle title string, initial char of the string to uppercase

func ToUpper

func ToUpper(str string) string

ToUpper convert a string to uppercase

func TrimStringSlice

func TrimStringSlice(raw []string) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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