htext

package
v1.1.44 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RegPatNumberDecimal = "^[+-]*\\d+$"
	RegPatNumberHex     = "^0[xX][0-9a-fA-F]+$"
	RegPatColorHex      = "^#[0-9a-fA-F]+$"
	RegPatFileURL       = "^https?://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]$"
	RegPatNumber        = "((-?\\d+)(\\.\\d+)?)"
	RegPatScienceNote   = "[-+]?\\d+(\\.?\\d+)?[eE]{1}[-+]?\\d+"
	RegPatString        = "[A-Za-z0-9]+"
	RegPatDate          = "" /* 126-byte string literal not displayed */
	RegPatDateTime      = "" /* 193-byte string literal not displayed */
	RegPatChinese       = "([\u4e00-\u9fa5]+)"
	RegPatIP            = `((0|[1-9]\d?|1\d\d|2[0-4]\d|25[0-5])\.){3}(0|[1-9]\d?|1\d\d|2[0-4]\d|25[0-5])`
	RegPatEmail         = "^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.[a-zA-Z0-9]{2,6}$"
	RegPatMobile        = "^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|191|199|193|(147))\\d{8}$"
)
View Source
const (
	CipherBase64 = "base64"
)

Variables

This section is empty.

Functions

func Decode

func Decode(src string) (string, error)

func IsDate

func IsDate(s string) bool

func IsDateTime

func IsDateTime(s string) bool

func IsDecimal

func IsDecimal(s string) bool

func IsEmail

func IsEmail(s string) bool

func IsEmptyLine

func IsEmptyLine(s string) bool

func IsHex

func IsHex(s string) bool

func IsIPv4

func IsIPv4(v string) bool

func IsMobile

func IsMobile(s string) bool

func IsNumber

func IsNumber(s string) bool

func IsURL

func IsURL(s string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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