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

ascii

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualFold added in v0.2.14

func EqualFold(a, b []byte) bool

EqualFold is a version of bytes.EqualFold designed to work on ASCII input instead of UTF-8.

When the program has guarantees that the input is composed of ASCII characters only, it allows for greater optimizations.

func EqualFoldString added in v0.2.14

func EqualFoldString(a, b string) bool

EqualFoldString is a version of strings.EqualFold designed to work on ASCII input instead of UTF-8.

When the program has guarantees that the input is composed of ASCII characters only, it allows for greater optimizations.

func HasPrefixFold added in v0.2.14

func HasPrefixFold(s, prefix []byte) bool

func HasPrefixFoldString added in v0.2.14

func HasPrefixFoldString(s, prefix string) bool

func HasSuffixFold added in v0.2.14

func HasSuffixFold(s, suffix []byte) bool

func HasSuffixFoldString added in v0.2.14

func HasSuffixFoldString(s, suffix string) bool

func Valid

func Valid(b []byte) bool

Valid returns true if b contains only ASCII characters.

func ValidByte added in v0.1.2

func ValidByte(b byte) bool

ValidBytes returns true if b is an ASCII character.

func ValidPrint added in v0.1.2

func ValidPrint(b []byte) bool

Valid returns true if b contains only printable ASCII characters.

func ValidPrintByte added in v0.1.2

func ValidPrintByte(b byte) bool

ValidBytes returns true if b is an ASCII character.

func ValidPrintRune added in v0.1.2

func ValidPrintRune(r rune) bool

ValidBytes returns true if b is an ASCII character.

func ValidPrintString added in v0.1.2

func ValidPrintString(s string) bool

ValidString returns true if s contains only printable ASCII characters.

func ValidRune added in v0.1.2

func ValidRune(r rune) bool

ValidBytes returns true if b is an ASCII character.

func ValidString

func ValidString(s string) bool

ValidString returns true if s contains only ASCII characters.

Types

This section is empty.

Jump to

Keyboard shortcuts

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