go-rfc2396/hex/byte.go

19 lines
282 B
Go
Raw Permalink Normal View History

2023-12-08 04:42:35 +00:00
package hex
import (
"sourcecode.social/reiver/go-rfc2396/digit"
)
func ByteIs(value byte) bool {
switch {
case digit.ByteIs(value):
return true
case 'A' <= value && value <= 'F':
return true
case 'a' <= value && value <= 'f':
return true
default:
return false
}
}