...
1 package characters
2
3 var invalidAsciiTable = [256]bool{
4 0x00: true,
5 0x01: true,
6 0x02: true,
7 0x03: true,
8 0x04: true,
9 0x05: true,
10 0x06: true,
11 0x07: true,
12 0x08: true,
13
14
15 0x0B: true,
16 0x0C: true,
17
18 0x0E: true,
19 0x0F: true,
20 0x10: true,
21 0x11: true,
22 0x12: true,
23 0x13: true,
24 0x14: true,
25 0x15: true,
26 0x16: true,
27 0x17: true,
28 0x18: true,
29 0x19: true,
30 0x1A: true,
31 0x1B: true,
32 0x1C: true,
33 0x1D: true,
34 0x1E: true,
35 0x1F: true,
36
37 0x7F: true,
38 }
39
40 func InvalidAscii(b byte) bool {
41 return invalidAsciiTable[b]
42 }
43
View as plain text