stdstring

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindNull

func FindNull(s *byte) int

FindNull returns the index of first \x00 byte, for UTF-8 encoding

func FindNull2

func FindNull2(s *uint16) int

FindNull2 returns the first \x00 wide-char, intended for UTF-16 encoding

func FromByteArray

func FromByteArray(arr *byte) string

FromByteArray converts a sequance of NULL terminated bytes into string assuming UTF-8 encoding.

func FromBytes

func FromBytes[T ~byte](b []T) string

FromBytes converts a byte slice to string without allocation

func ToBytes

func ToBytes[T ~byte](s string) []T

Types

type Header struct {
	Str unsafe.Pointer
	Len int
}

Jump to

Keyboard shortcuts

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