strutil

package
v0.0.0-...-fd1f36e Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 9 Imported by: 4

Documentation

Index

Constants

View Source
const (
	Empty           = ""                                                               // 空字符串
	Comma           = ","                                                              // 逗号
	Space           = " "                                                              // 空格
	Underscore      = "_"                                                              // 下划线
	Colon           = ":"                                                              // 冒号
	Dash            = "-"                                                              // 短横线
	Dot             = "."                                                              // 点
	Asterisk        = "*"                                                              // 星号
	Slash           = "/"                                                              // 斜杠
	Zero            = "0"                                                              // 0
	One             = "1"                                                              // 1
	True            = "true"                                                           // true
	False           = "false"                                                          // false
	Goroutine       = "goroutine"                                                      // 协程字符串
	Json            = "json"                                                           // json
	Omitempty       = "omitempty"                                                      // omitempty
	LetterAndNumber = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" // 字母和数字
	Crlf            = "\r\n"                                                           // 回车换行
	Quote           = "\""                                                             // 双引号

	// CharSlash 字符
	CharSlash = '/' // 斜杠
	CharSpace = ' ' // 空格
)

Variables

This section is empty.

Functions

func Equals

func Equals(sor string, tar string) bool

func EqualsIgnoreCase

func EqualsIgnoreCase(sor string, tar string) bool

func FirstLetter2Lower

func FirstLetter2Lower(str string) string

FirstLetter2Lower 将字符串的首字母转换为小写(小驼峰)

func GetCurrentGid

func GetCurrentGid() string

GetCurrentGid 获取当前协程id

func IsBlank

func IsBlank(str string) bool

func IsNotBlank

func IsNotBlank(str string) bool

func JoinPaths

func JoinPaths(absolutePath, relativePath string) string

func LastChar

func LastChar(str string) uint8

func MD5

func MD5(data string) string

MD5 将字符串进行md5加密处理

func NameSnake

func NameSnake(name string) string

NameSnake 将字符串转换为小写下划线

func RandStr

func RandStr(length int) string

func SpitNotLetterAndNumber

func SpitNotLetterAndNumber(str string) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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