Documentation
¶
Index ¶
- func Capitalize(s string) string
- func ContainsAny(s string, substrings ...string) bool
- func EscapeHTML(s string) string
- func FromBase64(s string) (string, error)
- func FromJSON(s string, v interface{}) error
- func IsAlpha(s string) bool
- func IsAlphanumeric(s string) bool
- func IsBlank(s string) bool
- func IsEmpty(s string) bool
- func IsNumeric(s string) bool
- func IsValidEmail(email string) bool
- func JoinInt(ints []int, separator string) string
- func PadLeft(s string, padChar rune, totalLength int) string
- func PadRight(s string, padChar rune, totalLength int) string
- func ParseFloat(s string, defaultValue float64) float64
- func ParseInt(s string, defaultValue int) int
- func RandomString(length int) string
- func RemoveNonPrintable(s string) string
- func Reverse(s string) string
- func ToBase64(s string) string
- func ToCamelCase(s string) string
- func ToI32(value string, defaultValue int32) int32
- func ToI64(value string, defaultValue int64) int64
- func ToInt(value string, defaultValue int) int
- func ToJSON(v interface{}) (string, error)
- func ToSnakeCase(s string) string
- func ToString(value string, defaultValue string) string
- func ToU32(value string, defaultValue uint32) uint32
- func ToU64(value string, defaultValue uint64) uint64
- func ToUin(value string, defaultValue uint) uint
- func Truncate(s string, maxLen int, suffix string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsAny ¶
ContainsAny 检查字符串是否包含任一指定字符串
func ParseFloat ¶
ParseFloat 将字符串解析为浮点数,可设置默认值
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.