gostring

package module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MIT Imports: 7 Imported by: 1

README

Golang String

📦 Golang 字符串

godoc goproxy.cn goreportcard.com deps.dev

安装

go get -v -u github.com/dtapps/gostring

Documentation

Index

Constants

View Source
const Version = "1.0.4"

Variables

This section is empty.

Functions

func Contains

func Contains(s, sep string) bool

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

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.1

func ToString(value interface{}) string

ToString 转换成string

func ToUint

func ToUint(s string) uint

ToUint string到uint64

func ToUint64

func ToUint64(s string) uint64

ToUint64 string到uint64

func TrimLastChar

func TrimLastChar(s string) string

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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