unsafeconv

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2025 License: BSD-2-Clause Imports: 2 Imported by: 1

README

unsafeconv

This module contains fast conversion functions between string and byte slices, with no copy or allocation. These functions should be used only if the byte slice content is never modified (treated as read-only).

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(s string) []byte

Bytes converts a string to a byte slice without any copy or allocations. The content of the resulting byte slice _must_ not be changed.

func Str

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

Str converts a byte slice to a string without making any copy or allocations.// The content of the underlying byte slice _must_ not be changed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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