Separate URL parsing routines
Copyright (C) 2025-2026 Trayambak Rai (xtrayambak@disroot.org)
Procs
func consumePreparedPath(url: URL; input: StringView): string {....raises: [], tags: [], forbids: [].}
func parseHost(url: URL; input: StringView): Result[string, ParseError] {. ...raises: [ValueError, Exception], tags: [RootEffect], forbids: [].}
func parseIpv6(input: StringView): Result[string, ParseError] {. ...raises: [ValueError], tags: [], forbids: [].}
func parseOpaqueHost(input: StringView): Option[string] {.inline, ...raises: [Exception], tags: [RootEffect], forbids: [].}
func parsePort(url: var URL; view: StringView; checkTrailingContent: bool): Option[ uint32] {....raises: [], tags: [], forbids: [].}
func parseScheme(scheme: StringView): SchemeType {....raises: [], tags: [], forbids: [].}
func serialize(url: URL; excludeFragment: bool = false): string {....raises: [], tags: [], forbids: [].}
- https://url.spec.whatwg.org/#url-serializing