zstring

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2019 License: MIT Imports: 7 Imported by: 35

Documentation

Overview

Package zstring provides String related operations

Index

Constants

View Source
const (
	// PadRight Right padding character
	PadRight int = iota
	// PadLeft Left padding character
	PadLeft
	// PadSides Two-sided padding characters,If the two sides are not equal, the right side takes precedence.
	PadSides
)

Variables

This section is empty.

Functions

func Buffer

func Buffer() (b strings.Builder)

Buffer Buffer

func Bytes2String

func Bytes2String(b []byte) string

Bytes2String bytes to string

func IsLcfirst added in v0.0.19

func IsLcfirst(str string) bool

IsLcfirst tests whether the given byte b is in lower case

func IsPattern added in v0.0.19

func IsPattern(str string) bool

func IsUcfirst added in v0.0.19

func IsUcfirst(str string) bool

IsUcfirst tests whether the given byte b is in upper case

func Lcfirst added in v0.0.19

func Lcfirst(str string) string

Lcfirst Lcfirst

func Len

func Len(str string) int

Len String length (Chinese)

func Match added in v0.0.19

func Match(str, pattern string) bool

func Pad

func Pad(raw string, length int, padStr string, padType int) string

Pad String padding

func Rand

func Rand(n int, ostr ...string) string

Rand rand string

func RandomInt added in v0.1.8

func RandomInt(num int) int

RandomInt randomInteger

func String2Bytes

func String2Bytes(s string) []byte

String2Bytes string to bytes

func Substr

func Substr(str string, start int, length ...int) string

Substr substr

func Ucfirst added in v0.0.19

func Ucfirst(str string) string

Ucfirst Ucfirst

Types

This section is empty.

Jump to

Keyboard shortcuts

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