package ascii
import "github.com/segmentio/asm/ascii"
Index ¶
- func EqualFold(a, b []byte) bool
- func EqualFoldString(a string, b string) bool
- func HasPrefixFold(s, prefix []byte) bool
- func HasPrefixFoldString(s, prefix string) bool
- func HasSuffixFold(s, suffix []byte) bool
- func HasSuffixFoldString(s, suffix string) bool
- func Valid(b []byte) bool
- func ValidByte(b byte) bool
- func ValidPrint(b []byte) bool
- func ValidPrintByte(b byte) bool
- func ValidPrintRune(r rune) bool
- func ValidPrintString(s string) bool
- func ValidRune(r rune) bool
- func ValidString(s string) bool
Functions ¶
func EqualFold ¶
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 ¶
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 HasPrefixFoldString ¶
func HasSuffixFold ¶
func HasSuffixFoldString ¶
func Valid ¶
Valid returns true if b contains only ASCII characters.
func ValidByte ¶
ValidBytes returns true if b is an ASCII character.
func ValidPrint ¶
ValidPrint returns true if b contains only printable ASCII characters.
func ValidPrintByte ¶
ValidPrintBytes returns true if b is an ASCII character.
func ValidPrintRune ¶
ValidPrintBytes returns true if b is an ASCII character.
func ValidPrintString ¶
ValidPrintString returns true if s contains only printable ASCII characters.
func ValidRune ¶
ValidBytes returns true if b is an ASCII character.
func ValidString ¶
ValidString returns true if s contains only ASCII characters.
Source Files ¶
ascii.go equal_fold.go equal_fold_amd64.go valid.go valid_amd64.go valid_print.go valid_print_amd64.go
- Version
- v1.2.0 (latest)
- Published
- Apr 27, 2022
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 10 hours ago –
Tools for package owners.