go-rfc3986/reserved.go

13 lines
370 B
Go
Raw Normal View History

2023-10-04 12:22:03 +00:00
package rfc3986
// IsReserved returns true if value of 'r' matches 'reserved' as defined in IETF RFC-3986:
//
// reserved = gen-delims / sub-delims
//
// gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"
//
// sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
func IsReserved(r rune) bool {
return IsGenDelim(r) || IsSubDelim(r)
}