strings

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	UTF8    = Charset("UTF-8")
	GB18030 = Charset("GB18030")
)

Variables

This section is empty.

Functions

func ConvertByte2String

func ConvertByte2String(byte []byte, charset Charset) string

func Escape added in v0.1.2

func Escape(reverse ...bool) *strings.Replacer

func EscapeString added in v0.1.2

func EscapeString(str string, reverse ...bool) string

func EscapeStringRepeat added in v0.1.2

func EscapeStringRepeat(str string, repeat int, reverse ...bool) string

func JoinToString

func JoinToString(elems any, sep string) string

JoinToString 数组加分隔符号转string

func UnsafeStringToBytes added in v0.1.19

func UnsafeStringToBytes(str string) []byte

func UnsafeToBytes added in v0.1.11

func UnsafeToBytes(s string) []byte

UnsafeToBytes 高性能转换 Deprecated: 请使用 UnsafeStringToBytes 有 GC 风险,uintptr是整数可能导致 GC 不知道这是指针,最后 GC 回收了底层数组

Types

type Charset

type Charset string

Jump to

Keyboard shortcuts

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