convert

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToBytes

func ToBytes(s string) []byte

ToBytes is used to zero copy converT `[]byte`. Attention! Since `string` is immutable in Go, theconversion from `string` to `[]byte` can easily casuse panic as change the converted `[]byte` is actually change the immutable `string` stored in .RODATA(maybe) section.

func ToString

func ToString(b []byte) string

ToString is used to zero copy converT `string`

Types

This section is empty.

Jump to

Keyboard shortcuts

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