go-rfc2396/hex/rune.go

19 lines
282 B
Go
Raw Normal View History

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