Help us shape the future of Go! Take the 2026 Go Developer Survey

bytesconv

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Hex2intTable                = "" /* 1002-byte string literal not displayed */
	ToLowerTable                = "" /* 727-byte string literal not displayed */
	ToUpperTable                = "" /* 727-byte string literal not displayed */
	QuotedArgShouldEscapeTable  = "" /* 1024-byte string literal not displayed */
	QuotedPathShouldEscapeTable = "" /* 1024-byte string literal not displayed */
	ValidCookieValueTable       = "" /* 1024-byte string literal not displayed */
	ValidHeaderFieldValueTable  = "" /* 1024-byte string literal not displayed */
	ValidHeaderFieldNameTable   = "" /* 1024-byte string literal not displayed */
)

Variables

This section is empty.

Functions

func AppendHTTPDate

func AppendHTTPDate(dst []byte, date time.Time) []byte

AppendHTTPDate appends HTTP-compliant representation of date to dst and returns the extended dst.

func AppendIntHex added in v0.10.0

func AppendIntHex(b []byte, n uint64) []byte

func AppendQuotedArg

func AppendQuotedArg(dst, src []byte) []byte

AppendQuotedArg appends url-encoded src to dst and returns appended dst.

func AppendQuotedPath

func AppendQuotedPath(dst, src []byte) []byte

func AppendUint

func AppendUint(dst []byte, n int) []byte

AppendUint appends n to dst and returns the extended dst.

func B2s

func B2s(b []byte) string

B2s converts byte slice to a string without memory allocation. See https://groups.google.com/forum/#!msg/Golang-Nuts/ENgbUzYvCuU/90yGx7GUAgAJ .

Note it may break if string and/or slice header will change in the future go versions.

func EncodedIntHexLen added in v0.10.0

func EncodedIntHexLen(n uint64) int

func LowercaseBytes

func LowercaseBytes(b []byte)

func ParseHTTPDate

func ParseHTTPDate(date []byte) (time.Time, error)

ParseHTTPDate parses HTTP-compliant (RFC1123) date.

func ParseUint

func ParseUint(buf []byte) (int, error)

ParseUint parses uint from buf.

func ParseUintBuf

func ParseUintBuf(b []byte) (int, int, error)

func ReadHexInt

func ReadHexInt(r network.Reader) (int, error)

func S2b

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

S2b converts string to a byte slice without memory allocation.

Note it may break if string and/or slice header will change in the future go versions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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