initial commits

master
Charles Iliya Krempeaux 2023-12-07 20:42:35 -08:00
parent 6390fce105
commit cd585814c3
4 changed files with 2146 additions and 0 deletions

18
hex/byte.go 100644
View File

@ -0,0 +1,18 @@
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
}
}

1055
hex/byte_test.go 100644

File diff suppressed because it is too large Load Diff

18
hex/rune.go 100644
View File

@ -0,0 +1,18 @@
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
}
}

1055
hex/rune_test.go 100644

File diff suppressed because it is too large Load Diff