go-rfc2234/subdelims.go

14 lines
365 B
Go
Raw Normal View History

2023-10-04 08:37:38 +00:00
package rfc2234
// IsSubDelim returns true if the value of 'r' matches 'sub-delims' as defined in IETF RFC-2234:
//
// sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
func IsSubDelim(r rune) bool {
switch r {
case '!' , '$' , '&' ,'\'' , '(' , ')' , '*' , '+' , ',' , ';' , '=':
return true
default:
return false
}
}