repositorypackage
1.0.0
Repository: https://github.com/ginx-contribs/str2bytes.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# README
str2bytes
str2bytes is a package support convert string
to []byte
, and convert []byte
to string
, both of them without memory copy.
install
ge get github.com/ginx-contribs/str2bytes@latest
usage
package main
import (
"github.com/ginx-contribs/str2bytes"
"log"
)
func main() {
bytes := str2bytes.Str2Bytes("hello world")
log.Println(bytes)
str := str2bytes.Bytes2Str(bytes)
log.Println(str)
}