stringx

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: MIT Imports: 16 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureLeft

func EnsureLeft(str, prefix string) string

func EnsureRight

func EnsureRight(str, suffix string) string

func GetAgeByBirthday

func GetAgeByBirthday(str string) int

func GetBirthdayByIdcardNo

func GetBirthdayByIdcardNo(str string) string

func GetFileExt

func GetFileExt(str string) string

func GetRandomString

func GetRandomString(length int, randomStringType ...int) string

func HandleTextareaInput

func HandleTextareaInput(str string) string

func IsAlnum

func IsAlnum(str string) bool

func IsDate

func IsDate(str string) bool

func IsDatetime

func IsDatetime(str string) bool

func IsEmail

func IsEmail(str string) bool

func IsFloat

func IsFloat(str string) bool

func IsIdcard

func IsIdcard(str string) bool

func IsInt

func IsInt(str string) bool

func IsLetteric

func IsLetteric(str string) bool

func IsNatiioalPhoneNumber

func IsNatiioalPhoneNumber(str string) bool

func IsNationalMobileNumber

func IsNationalMobileNumber(str string) bool

func IsNumeric

func IsNumeric(str string) bool

func IsPasswordTooSimple

func IsPasswordTooSimple(str string) bool

func IsTime

func IsTime(str string) bool

func Lcfirst

func Lcfirst(str string) string

func Lcwords

func Lcwords(str, joinBy string, delimiters ...string) string

func Mask

func Mask(str string, prefixLen, suffixLen int) string

func MaskEmail

func MaskEmail(str string) string

func PadEnd

func PadEnd(str string, length int, padChars ...string) string

func PadStart

func PadStart(str string, length int, padChars ...string) string

func ReadFromFile

func ReadFromFile(fpath string) string

func RegexMatch

func RegexMatch(str, pattern string) bool

func RegexReplace

func RegexReplace(str, pattern, repl string) string

func RegexpCatch

func RegexpCatch(str, regex string) []string

func RegexpCatchAll

func RegexpCatchAll(str, regex string) [][]string

func RemoveSqlSpecialChars

func RemoveSqlSpecialChars(str string) string

func ReplaceWithRegexp

func ReplaceWithRegexp(str, pattern, repl string) string

func SplitByChars

func SplitByChars(str string, chars ...rune) []string

func SplitWithRegexp

func SplitWithRegexp(str, pattern string) []string

func StripTags

func StripTags(str string) string

func SubstringAfter

func SubstringAfter(str, delimiter string, last ...bool) string

func SubstringAfterLast

func SubstringAfterLast(str, delimiter string) string

func SubstringBefore

func SubstringBefore(str, delimiter string, last ...bool) string

func SubstringBeforeLast

func SubstringBeforeLast(str, delimiter string) string

func ThousandSep

func ThousandSep(str string) string

func ToCharArray

func ToCharArray(str string) []string

func ToDataSize

func ToDataSize(str string) int64

func ToDuration

func ToDuration(str string) time.Duration

func ToGb18030

func ToGb18030(str string) string

func ToShortDate

func ToShortDate(str string) time.Time

func ToTime

func ToTime(str string) time.Time

func ToTimestamp

func ToTimestamp(str string) int64

func Trim

func Trim(str string, chars ...rune) string

func TrimEnd

func TrimEnd(str string, chars ...rune) string

func TrimStart

func TrimStart(str string, chars ...rune) string

func Ucfirst

func Ucfirst(str string) string

func Ucwords

func Ucwords(str, joinBy string, delimiters ...string) string

func UnescapeUnicode

func UnescapeUnicode(arg0 interface{}) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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