Documentation
¶
Overview ¶
Package str2bytes provides fast, but unsafe functions to convert string to []byte or vice versa.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToString ¶
BytesToString converts slice of bytes to string without allocation. See unsafe.String
func StringToBytes ¶
StringToBytes converts string to slice of bytes without allocation. Note, that returned slice must NOT be modified, since strings in Go are immutable. See unsafe.Slice.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.