strings

package
v0.0.0-...-e67ccf8 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(s []string, a string) []string

func AddWithDistinct

func AddWithDistinct(s []string, a string) []string

func Bool

func Bool(s string) (bool, error)

Bool string转换为bool

func Bytes

func Bytes(s string) (b []byte)

Bytes string转换为[]byte

func Contain

func Contain(ele string, s []string) bool

Contain 判断字符串切片是否包含ele

func Equal

func Equal(a, b []string) bool

Equal 判断两个字符串切片值是否相等

func Float32

func Float32(s string) (float32, error)

Float32 string转换为float32

func Float64

func Float64(s string) (float64, error)

Float64 string转换为float64

func Int

func Int(s string) (int, error)

Int string转换为int

func Int64

func Int64(s string) (int64, error)

Int64 string转换为int64

func IsEmpty

func IsEmpty(s string) bool

IsEmpty 判断字符串本身或者去除空格后是否为空字符串

func Last

func Last(s string, b byte) int

Last 返回s中最后一个b的位置

func MaxSubStrLen

func MaxSubStrLen(str string) int

MaxSubStrLen 寻找最长不重复子串长度

func Remove

func Remove(s *[]string, eles ...string)

Remove 从s中删除第一个ele

func RemoveAll

func RemoveAll(s *[]string, eles ...string)

RemoveAll 删除所有的eles

func Reverse

func Reverse(s []string)

Reverse 字符切片反转

func ToLower

func ToLower(s string) string

func ToUpper

func ToUpper(s string) string

func Uint64

func Uint64(s string) (uint64, error)

Uint64 string转换为uint64

func Union

func Union(s []string, a []string) []string

func Unique

func Unique(s []string) (r []string)

Unique 字符串切片去重

Types

This section is empty.

Jump to

Keyboard shortcuts

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