stringutil

package
v0.3.37 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: MIT Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddStringGap

func AddStringGap(str string, min int, gap int) string

func CamelToSnake added in v0.1.26

func CamelToSnake(str string) string

func Capitalize

func Capitalize(str string) string

func CopyString

func CopyString(str string) string

func DecodeBig5 added in v0.3.36

func DecodeBig5(s []byte) ([]byte, error)

convert BIG5 to UTF-8

func DecodeGBK added in v0.3.36

func DecodeGBK(s []byte) ([]byte, error)

convert GBK to UTF-8

func EncodeBig5 added in v0.3.36

func EncodeBig5(s []byte) ([]byte, error)

convert UTF-8 to BIG5

func EncodeGBK added in v0.3.36

func EncodeGBK(s []byte) ([]byte, error)

convert UTF-8 to GBK

func FirstToLower

func FirstToLower(str string) string

func FirstToUpper

func FirstToUpper(str string) string

func LocalPath

func LocalPath() string

func Nil added in v0.2.13

func Nil[T any]() T

func RandString

func RandString(len int) string

func SnakeToCamel added in v0.1.43

func SnakeToCamel(src string) string

func SplitArray added in v0.2.12

func SplitArray[T comparable](s string, split string) ([]T, error)

func SplitCamelCase

func SplitCamelCase(src string) []string

func SplitCamelCaseCapitalize

func SplitCamelCaseCapitalize(src string) (entries []string)

func SplitCamelCaseCapitalizeSlash

func SplitCamelCaseCapitalizeSlash(src string) string

func SplitCamelCaseLowerSlice added in v0.1.26

func SplitCamelCaseLowerSlice(src string) (entries []string)

func SplitCamelCaseLowerSnake added in v0.1.26

func SplitCamelCaseLowerSnake(src string) string

func SplitCamelCaseUpperSlice added in v0.1.26

func SplitCamelCaseUpperSlice(src string) (entries []string)

func SplitCamelCaseUpperSnake added in v0.1.26

func SplitCamelCaseUpperSnake(src string) string

func SplitFloat32Array added in v0.2.12

func SplitFloat32Array(s string, split string) ([]float32, error)

func SplitFloat64Array added in v0.1.43

func SplitFloat64Array(s string, split string) ([]float64, error)

func SplitInt32Array added in v0.0.6

func SplitInt32Array(s string, split string) ([]int32, error)

func SplitInt32Map added in v0.0.6

func SplitInt32Map(s string, split string, mapSep string) (map[int32]int32, error)

func SplitInt64Array added in v0.0.6

func SplitInt64Array(s string, split string) ([]int64, error)

func SplitIntArray added in v0.0.6

func SplitIntArray(s string, split string) ([]int, error)

func SplitStringArray added in v0.1.29

func SplitStringArray(s string, split string) []string

func StartWithCapital

func StartWithCapital(str string) bool

func TrimEnd added in v0.1.34

func TrimEnd(str string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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