xunsafe

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 1 Imported by: 1

Documentation

Overview

Package xunsafe provides utilities for unsafe operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToString

func BytesToString(slice []byte) string

BytesToString converts a byte slice to a string without memory allocation.

The byte slice must not be used, modified, or reallocated after this call since the returned string references the same memory.

func StringToBytes

func StringToBytes(str string) []byte

StringToBytes converts a string to a byte slice without memory allocation.

The string must not be used, modified, or reallocated after this call since the returned byte slice references the same memory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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