bytesconv

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 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) (b []byte)

ToBytes converts string to a byte slice without memory allocation.

Note it may break if string and/or slice header will change in the future go versions.

func ToBytesSlice

func ToBytesSlice(ss []string) (bb [][]byte)

ToBytesSlice converts []string to [][]byte using ToBytes.

func ToString

func ToString(b []byte) string

ToString converts byte slice to a string without memory allocation. See https://groups.google.com/forum/#!msg/Golang-Nuts/ENgbUzYvCuU/90yGx7GUAgAJ .

func ToStringSlice

func ToStringSlice(bb [][]byte) (ss []string)

ToStringSlice converts [][]byte to []string using ToString.

Types

This section is empty.

Jump to

Keyboard shortcuts

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