github.com/kamalshkeir/kencoding@v0.0.2-0.20230409043843-44b609a0475a/ascii/valid_print.go (about) 1 //go:generate go run valid_print_asm.go -out valid_print_amd64.s -stubs valid_print_amd64.go 2 package ascii 3 4 import ( 5 "github.com/kamalshkeir/kasm/ascii" 6 ) 7 8 // Valid returns true if b contains only printable ASCII characters. 9 func ValidPrint(b []byte) bool { 10 return ascii.ValidPrint(b) 11 } 12 13 // ValidBytes returns true if b is an ASCII character. 14 func ValidPrintByte(b byte) bool { 15 return ascii.ValidPrintByte(b) 16 } 17 18 // ValidBytes returns true if b is an ASCII character. 19 func ValidPrintRune(r rune) bool { 20 return ascii.ValidPrintRune(r) 21 } 22 23 // ValidString returns true if s contains only printable ASCII characters. 24 func ValidPrintString(s string) bool { 25 return ascii.ValidPrintString(s) 26 }