str

package
v0.0.53 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelToSnake added in v0.0.32

func CamelToSnake(s string) string

CamelToSnake 将驼峰格式转换为下划线格式

func CharLength

func CharLength(str string) int

CharLength 返回字符串的字符长度

func HasText

func HasText(str string) bool

HasText 检查是否具有有意义的内容

func IsCamelCase added in v0.0.32

func IsCamelCase(s string) bool

IsCamelCase 判断是否是驼峰格式

func IsSnakeCase added in v0.0.32

func IsSnakeCase(s string) bool

IsSnakeCase 是否为下划线格式

func LowFirstChar added in v0.0.17

func LowFirstChar(value string) string

LowFirstChar 首字母小写

func SnakeToCamel added in v0.0.32

func SnakeToCamel(s string) string

SnakeToCamel 下划线转驼峰

func Substring

func Substring(str string, start int, end ...int) string

Substring 字符串截取指定长度 包含start下标,不含end下标

func UpFirstChar added in v0.0.32

func UpFirstChar(value string) string

UpFirstChar 首字母大写

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder(str ...string) *Builder

NewBuilder 创建一个StringBuilder

func (*Builder) ToString

func (b *Builder) ToString() string

func (*Builder) WriteBool added in v0.0.53

func (b *Builder) WriteBool(bool bool) *Builder

func (*Builder) WriteByte

func (b *Builder) WriteByte(byte byte) *Builder

func (*Builder) WriteBytes

func (b *Builder) WriteBytes(bytes []byte) *Builder

func (*Builder) WriteFlot32 added in v0.0.53

func (b *Builder) WriteFlot32(f32 float32) *Builder

func (*Builder) WriteFlot64 added in v0.0.53

func (b *Builder) WriteFlot64(f64 float64) *Builder

func (*Builder) WriteInt added in v0.0.53

func (b *Builder) WriteInt(i int) *Builder

func (*Builder) WriteInt16 added in v0.0.53

func (b *Builder) WriteInt16(i16 int16) *Builder

func (*Builder) WriteInt32 added in v0.0.53

func (b *Builder) WriteInt32(i32 int32) *Builder

func (*Builder) WriteInt64 added in v0.0.53

func (b *Builder) WriteInt64(i64 int64) *Builder

func (*Builder) WriteInt8 added in v0.0.53

func (b *Builder) WriteInt8(i8 int8) *Builder

func (*Builder) WriteRune

func (b *Builder) WriteRune(r rune) *Builder

func (*Builder) WriteString

func (b *Builder) WriteString(str string) *Builder

func (*Builder) WriteUint added in v0.0.53

func (b *Builder) WriteUint(u uint) *Builder

func (*Builder) WriteUint16 added in v0.0.53

func (b *Builder) WriteUint16(u16 uint16) *Builder

func (*Builder) WriteUint32 added in v0.0.53

func (b *Builder) WriteUint32(u32 uint32) *Builder

func (*Builder) WriteUint64 added in v0.0.53

func (b *Builder) WriteUint64(u64 uint64) *Builder

func (*Builder) WriteUint8 added in v0.0.53

func (b *Builder) WriteUint8(u8 uint8) *Builder

Jump to

Keyboard shortcuts

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