strings

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capitalize

func Capitalize(str string) string

Capitalize make first letter to upper Source https://www.cnblogs.com/Detector/p/9686443.html

func GenRandToken added in v2.3.0

func GenRandToken(keySize int) (string, error)

GenToken rand id + rand key + jwt

func GenToken added in v2.2.0

func GenToken(userID int64, keySize int) (string, error)

GenToken userID + rand key + jwt

func IsCapitalize

func IsCapitalize(s string) bool

IsCapitalize whether the first letter is upper

func IsNumber

func IsNumber(str string) bool

IsNumber determine if it is a pure numeric string

func Rand

func Rand(size int) (string, error)

Rand generate rand string with bytes size

func Remove

func Remove(s, old string) string

Remove remove all old from s

func RemoveEmpties

func RemoveEmpties(s string) string

RemoveEmpties move all empties

func ReplaceAllIgnoreCase added in v2.2.0

func ReplaceAllIgnoreCase(str, old, new string) string

ReplaceAllIgnoreCase replace all ignore case

func SplitToChunks

func SplitToChunks(s string, chunkSize int) []string

SplitToChunks Split large string in n-size chunks

Types

This section is empty.

Jump to

Keyboard shortcuts

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