gostring

package
v1.0.51 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains added in v1.0.47

func Contains(s, sep string) bool

Contains 判断字符串是否包含某个字符

func GenerateId added in v1.0.51

func GenerateId(customId string) string

GenerateId 生成18一编号

func GenerateIdAndTime added in v1.0.51

func GenerateIdAndTime(customId, customTime string) string

GenerateIdAndTime 生成18一编号

func GetUuId added in v1.0.51

func GetUuId() string

GetUuId 由 32 个十六进制数字组成,以 6 个组显示,由连字符 - 分隔

func HmacSha256Hex

func HmacSha256Hex(key, strToSign string) string

func LineBreak

func LineBreak(str string) string

LineBreak 去除换行符

func NumericalToString

func NumericalToString(value interface{}) (string, bool)

func Replace

func Replace(str, old, new string) string

Replace 字符串替换

func Space

func Space(str string) string

Space 去除空格

func SpaceAndLineBreak

func SpaceAndLineBreak(str string) string

SpaceAndLineBreak 去除空格和去除换行符

func Split

func Split(s string, sep string) []string

Split 字符串分隔

func ToFloat64

func ToFloat64(s string) float64

ToFloat64 string到float64

func ToInt

func ToInt(s string) int

ToInt string到int

func ToInt64

func ToInt64(s string) int64

ToInt64 string到int64

func ToString added in v1.0.47

func ToString(value interface{}) string

ToString 转换成string

func ToUint added in v1.0.44

func ToUint(s string) uint

ToUint string到uint64

func ToUint64 added in v1.0.44

func ToUint64(s string) uint64

ToUint64 string到uint64

func TrimLastChar

func TrimLastChar(s string) string

TrimLastChar 删除字符串中的最后一个

Types

type Only added in v1.0.51

type Only struct {
}

func NewOnly added in v1.0.51

func NewOnly() *Only

Jump to

Keyboard shortcuts

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