diff --git a/misc.go b/misc.go index eb5c75c..30f0e95 100644 --- a/misc.go +++ b/misc.go @@ -131,3 +131,11 @@ func expandSlice[T any](slc []T, newSize int) []T { copy(toRet, slc) return toRet } + +func isHex(c rune) bool { + return slices.Contains([]rune("0123456789abcdefABCDEF"), c) +} + +func isOctal(c rune) bool { + return slices.Contains([]rune("01234567"), c) +}