go-rfc2234/bit.go

9 lines
184 B
Go
Raw Normal View History

2023-10-06 16:21:18 +00:00
package rfc2234
// IsBit returns true if the value of 'r' matches 'BIT' as defined in IETF RFC-2234:
//
// BIT = "0" / "1"
func IsBit(r rune) bool {
return ('0' == r || '1' == r)
}