File: valid_print.go

package info (click to toggle)
golang-github-segmentio-encoding 0.5.3-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 14,472 kB
  • sloc: makefile: 286
file content (26 lines) | stat: -rw-r--r-- 687 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//go:generate go run valid_print_asm.go -out valid_print_amd64.s -stubs valid_print_amd64.go
package ascii

import (
	"github.com/segmentio/asm/ascii"
)

// Valid returns true if b contains only printable ASCII characters.
func ValidPrint(b []byte) bool {
	return ascii.ValidPrint(b)
}

// ValidBytes returns true if b is an ASCII character.
func ValidPrintByte(b byte) bool {
	return ascii.ValidPrintByte(b)
}

// ValidBytes returns true if b is an ASCII character.
func ValidPrintRune(r rune) bool {
	return ascii.ValidPrintRune(r)
}

// ValidString returns true if s contains only printable ASCII characters.
func ValidPrintString(s string) bool {
	return ascii.ValidPrintString(s)
}