validateComponentChars

private fnvoid validateComponentChars(string s, Component comp, bool allowNonAscii, string what) @safe

Validate that s contains only RFC 3986-allowed characters for comp.

In strict parsing, this rejects ASCII control characters, non-ASCII bytes (unless allowNonAscii is true), and any characters not permitted by the RFC 3986 ABNF for the selected component.

Notes: This does not validate overall structural syntax (e.g., path segment rules); it only checks per-character admissibility and assumes %HH escapes were already validated by validatePctEscapes.

Parameters

sComponent string to validate.
compComponent context.
allowNonAsciiWhether to allow bytes >= 0x80 (extension behavior).
whatHuman-readable component name used for error messages.

Throws

UriParseException if an invalid character is found.