str

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

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)

func Base64Encode

func Base64Encode(str string) string

func Dangerous

func Dangerous(s string) bool

func GetPatAndTimeFormat

func GetPatAndTimeFormat(s string) (string, string)

func IsIdentifier

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

func IsIp

func IsIp(s 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 MD5

func MD5(str string) (string, error)

func RandDigits

func RandDigits(n int) string

func RandLetters

func RandLetters(n int) string

func Sha256

func Sha256(str string) (string, error)

func Sha512

func Sha512(str string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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