go-rfc2234/digit.go

9 lines
192 B
Go
Raw Normal View History

2023-10-04 08:36:57 +00:00
package rfc2234
// IsDigit returns true if value of 'r' matches 'ALPHA' as defined in IETF RFC-2234:
//
// DIGIT = %30-%39 ; 0-9
func IsDigit(r rune) bool {
return '0' <= r && r <= '9'
}