str

package
v1.8.51 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterEmptyChar

func FilterEmptyChar(str string) string

FilterEmptyChar 过滤空字符串

func Md5

func Md5(str string) string

Md5 计算字符串的 MD5

func PadCnSpaceChar

func PadCnSpaceChar(label string, spaces int) string

PadCnSpaceChar 使用中文空格为字符串填充

func RegexpMatch

func RegexpMatch(text string, pattern string) bool

RegexpMatch 使用正则表达式匹配字符串

func Sha256 added in v1.8.45

func Sha256(s string, isSha3 bool) (string, error)

Sha256 计算并返回字符串的 SHA(2)/SHA3-256 哈希值

func ToInt64

func ToInt64(str string) (int64, error)

ToInt64 字符串数字转换成 int64

func ToPrintJSON

func ToPrintJSON(v interface{}) (string, error)

ToPrintJSON 将结构体转换为适合打印的格式化的 JSON 字符串

func ToUint32

func ToUint32(str string) uint32

ToUint32 字符串转换成 uint32

func UniqueStrings

func UniqueStrings(input []string) []string

UniqueStrings 返回一个新的切片,其中包含原切片中的唯一字符串

Types

This section is empty.

Jump to

Keyboard shortcuts

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