ascii

package
Version: v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualFold

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

func EqualFoldString(a string, 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

func HasPrefixFold(s, prefix []byte) bool

func HasPrefixFoldString

func HasPrefixFoldString(s, prefix string) bool

func HasSuffixFold

func HasSuffixFold(s, suffix []byte) bool

func HasSuffixFoldString

func HasSuffixFoldString(s, suffix string) bool

func Valid

func Valid(b []byte) bool

Valid returns true if b contains only ASCII characters.

func ValidByte

func ValidByte(b byte) bool

ValidBytes returns true if b is an ASCII character.

func ValidPrint

func ValidPrint(b []byte) bool

ValidPrint returns true if b contains only printable ASCII characters.

func ValidPrintByte

func ValidPrintByte(b byte) bool

ValidPrintBytes returns true if b is an ASCII character.

func ValidPrintRune

func ValidPrintRune(r rune) bool

ValidPrintBytes returns true if b is an ASCII character.

func ValidPrintString

func ValidPrintString(s string) bool

ValidPrintString returns true if s contains only printable ASCII characters.

func ValidRune

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