byteutil

package
v0.27.5 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Package byteutil contains byte (string) processing functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteContainsFold

func ByteContainsFold(s, substr []byte) bool

ByteContainsFold is like bytes.Contains but uses Unicode case-folding.

func ByteHasPrefixFold

func ByteHasPrefixFold(s, prefix []byte) bool

HasPrefixFold is like strings.HasPrefix but uses Unicode case-folding.

func ByteIndexFold

func ByteIndexFold(s, substr []byte) int

ByteIndexFold is like bytes.Contains but uses Unicode case-folding.

func BytesToString

func BytesToString(p []byte) (s string)

BytesToString returns the []byte as a string, unsafe.

func EqualFoldRune

func EqualFoldRune(sr, tr rune) bool

EqualFoldRune compares a and b runes whether they fold equally.

The code comes from strings.EqualFold, but shortened to only one rune.

func StringToBytes

func StringToBytes(s string) []byte

StringToBytes returns the string as a []byte, unsafe.

Types

This section is empty.

Jump to

Keyboard shortcuts

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