isPctAllowed

fnbool isPctAllowed(dchar c, Component comp) @nogc nothrow @safe

Returns true if character c is allowed to appear unescaped (literal ASCII byte) in comp.

Notes:

  • Only ASCII characters may be considered allowed; non-ASCII must be percent-encoded per RFC 3986.
  • This predicate encodes the per-component allowed reserved sets from RFC 3986 and the unreserved set.
  • It does not validate full component syntax; parsing performs structural validation.

    Parameters

    cUnicode code point to check.
    compURI component context.

    Returns

    true if c may be emitted without percent-encoding, false otherwise.