unsafeext

package
v5.27.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: Apache-2.0, MIT Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToString

func BytesToString(b []byte) string

BytesToString converts an array of bytes into a string without allocating. The byte slice passed to this function is not to be used after this call as it's unsafe; you have been warned.

func StringToBytes

func StringToBytes(s string) (b []byte)

StringToBytes converts an existing string into an []byte without allocating. The string passed to this functions is not to be used again after this call as it's unsafe; you have been warned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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