github.com/segmentio/encoding@v0.4.0/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/segmentio/asm/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  }