string

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandString

func RandString(n int) string

RandString 生成指定位数随机字符串

func ToStr

func ToStr(arg any, timeFormat ...string) string

ToStr *

Types

type StringUtils

type StringUtils string

StringUtils *

func (StringUtils) Base64Decode

func (s StringUtils) Base64Decode() (string, error)

Base64Decode *

func (StringUtils) Base64DecodeByte

func (s StringUtils) Base64DecodeByte() ([]byte, error)

Base64DecodeByte *

func (StringUtils) Bool

func (s StringUtils) Bool() (bool, error)

Bool *

func (StringUtils) Bytes added in v1.2.9

func (s StringUtils) Bytes() []byte

func (StringUtils) Contains

func (s StringUtils) Contains(sep string) bool

Contains *

func (StringUtils) DBCToSBC

func (s StringUtils) DBCToSBC() string

DBCToSBC 半角字符转换为全角字符

func (StringUtils) Float32

func (s StringUtils) Float32() (float32, error)

Float32 *

func (StringUtils) Float64

func (s StringUtils) Float64() (float64, error)

Float64 *

func (StringUtils) HexDecode added in v1.2.7

func (s StringUtils) HexDecode() (string, error)

func (StringUtils) HexEncode added in v1.2.7

func (s StringUtils) HexEncode() string

func (StringUtils) HmacMD5 added in v1.2.6

func (s StringUtils) HmacMD5(key string) string

func (StringUtils) HmacSHA1

func (s StringUtils) HmacSHA1(key string) string

HmacSHA1 *

func (StringUtils) HmacSHA256

func (s StringUtils) HmacSHA256(key string) string

HmacSHA256 *

func (StringUtils) HmacSHA512

func (s StringUtils) HmacSHA512(key string) string

HmacSHA512 *

func (StringUtils) Int

func (s StringUtils) Int() (int, error)

Int *

func (StringUtils) Int16

func (s StringUtils) Int16() (int16, error)

Int16 *

func (StringUtils) Int32

func (s StringUtils) Int32() (int32, error)

Int32 *

func (StringUtils) Int64

func (s StringUtils) Int64() (int64, error)

Int64 *

func (StringUtils) Int8

func (s StringUtils) Int8() (int8, error)

Int8 *

func (StringUtils) LPad

func (s StringUtils) LPad(size ...int) string

LPad 左位补零("31", 6 => 000031)

func (StringUtils) MD5

func (s StringUtils) MD5() string

MD5 *

func (StringUtils) SBCCommaOrSemiColonToDBC

func (s StringUtils) SBCCommaOrSemiColonToDBC() string

SBCCommaOrSemiColonToDBC 替换字符串中的全角逗号和分号为半角逗号

func (StringUtils) SBCToDBC

func (s StringUtils) SBCToDBC() string

SBCToDBC 全角字符转换为半角字符

func (StringUtils) SHA1

func (s StringUtils) SHA1() string

SHA1 *

func (StringUtils) SHA256

func (s StringUtils) SHA256() string

SHA256 *

func (StringUtils) SHA512

func (s StringUtils) SHA512() string

SHA512 *

func (StringUtils) SM3 added in v1.2.8

func (s StringUtils) SM3() string

func (StringUtils) StdBase64Encode

func (s StringUtils) StdBase64Encode() string

StdBase64Encode *

func (StringUtils) String

func (s StringUtils) String() string

String *

func (StringUtils) ToTitleLower

func (s StringUtils) ToTitleLower() string

ToTitleLower *

func (StringUtils) ToTitleUpper

func (s StringUtils) ToTitleUpper() string

ToTitleUpper *

func (StringUtils) TrimRightSeparator

func (s StringUtils) TrimRightSeparator() string

TrimRightSeparator 半角字符转换为全角字符

func (StringUtils) URLBase64Encode

func (s StringUtils) URLBase64Encode() string

URLBase64Encode *

func (StringUtils) Uint

func (s StringUtils) Uint() (uint, error)

Uint *

func (StringUtils) Uint16

func (s StringUtils) Uint16() (uint16, error)

Uint16 *

func (StringUtils) Uint32

func (s StringUtils) Uint32() (uint32, error)

Uint32 *

func (StringUtils) Uint64

func (s StringUtils) Uint64() (uint64, error)

Uint64 *

func (StringUtils) Uint8

func (s StringUtils) Uint8() (uint8, error)

Uint8 *

func (StringUtils) VersionSerialize

func (s StringUtils) VersionSerialize() string

VersionSerialize 序列化版本号

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳