unsafe

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func B2S

func B2S(b []byte) string

B2S unsafely converts b to string.

WARNING: The returned string shares the underlying memory with b and therefore breaks Go's string immutability guarantee. Use for temporary conversions with utmost caution!

func S2B

func S2B(s string) []byte

S2B unsafely converts s to []byte.

WARNING: The returned byte slice shares the underlying memory with s and therefore breaks Go's string immutability guarantee. Use for temporary conversions with utmost caution!

Types

This section is empty.

Jump to

Keyboard shortcuts

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