Documentation
¶
Index ¶
- Constants
- func ConvertByte2String(byte []byte, charset Charset) string
- func Escape(reverse ...bool) *strings.Replacer
- func EscapeString(str string, reverse ...bool) string
- func EscapeStringRepeat(str string, repeat int, reverse ...bool) string
- func JoinToString(elems any, sep string) string
- func UnsafeStringToBytes(str string) []byte
- func UnsafeToBytes(s string) []byte
- type Charset
Constants ¶
View Source
const ( UTF8 = Charset("UTF-8") GB18030 = Charset("GB18030") )
Variables ¶
This section is empty.
Functions ¶
func ConvertByte2String ¶
func EscapeString ¶ added in v0.1.2
func EscapeStringRepeat ¶ added in v0.1.2
func UnsafeStringToBytes ¶ added in v0.1.19
func UnsafeToBytes ¶ added in v0.1.11
UnsafeToBytes 高性能转换 Deprecated: 请使用 UnsafeStringToBytes 有 GC 风险,uintptr是整数可能导致 GC 不知道这是指针,最后 GC 回收了底层数组
Types ¶
Click to show internal directories.
Click to hide internal directories.