go-rfc3986/subdelims.go

14 lines
365 B
Go
Raw Normal View History

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