object
url(Representation)
Representation- URL and is components representation. Valid values areatom,codes, andchars.
URL validating, parsing, and normalizing predicates following RFC3986 nomenclature.
logtalk_load(url(loader))static, context_switching_callsPublic predicates
valid/1
True iff the argument is a valid URL, including optional query and fragment components.
staticvalid(URL)valid(++text) - zero_or_oneparse/2
Parses a URL into a list of its components: [scheme(Scheme), authority(Authority), path(Path), query(Query), fragment(Fragment)]. Fails if the URL is invalid and cannot be parsed.
staticparse(URL,Components)parse(++text,-list(compound)) - zero_or_onegenerate/2
Generates a normalized URL or RFC3986 relative reference from a list of components. Component lists headed by scheme/1 generate absolute URLs; lists without scheme/1 generate relative references.
staticgenerate(Components,URL)generate(++list(compound),-text) - zero_or_oneparse/3
Parses a URL or RFC3986 relative reference into a list of its components and classifies it as one of url, network_path, absolute_path, relative_path, query, or fragment.
staticparse(Reference,Components,Kind)parse(++text,-list(compound),-atom) - zero_or_onereference_kind/2
Classifies a valid reference as one of url, network_path, absolute_path, relative_path, query, or fragment.
staticreference_kind(Reference,Kind)reference_kind(++text,-atom) - zero_or_oneequivalent/2
True iff both arguments normalize to the same textual representation under the library normalization rules.
staticequivalent(Reference1,Reference2)equivalent(++text,++text) - zero_or_onerelativize/3
Relativizes a target absolute hierarchical URL against a base absolute hierarchical URL with the same scheme and authority, returning a non-empty relative reference accepted by the library. Fails when no such non-empty relative reference can be generated.
staticrelativize(Base,Target,Relative)relativize(++text,++text,-text) - zero_or_oneresolve/3
Resolves a reference against a base absolute hierarchical URL and returns a normalized absolute URL. The first argument must be an absolute hierarchical URL suitable for use as a base. The second argument may be either a relative reference or an absolute URL; when it is already absolute, the result is that absolute URL normalized and returned unchanged apart from normalization.
staticresolve(Base,Reference,Resolved)resolve(++text,++text,-text) - zero_or_onenormalize/2
Normalizes a URL or RFC3986 relative reference by standardizing its components. Normalization includes converting the scheme to lowercase when present, normalizing the authority, percent-encoding characters that require escaping, and simplifying path dot segments while preserving absolute and relative reference forms.
staticnormalize(Reference,NormalizedReference)normalize(++text,-text) - onefile_path_components/2
Converts a file-system path into file URL components represented as [authority(Authority), path(Path)]. Windows drive-letter and UNC paths are normalized to RFC3986-compatible file URL components.
staticfile_path_components(FilePath,Components)file_path_components(++text,-list(compound)) - oneProtected predicates
(no local declarations; see entity ancestors if any)
Private predicates
downcase_text/2
Converts text to lowercase (ASCII only). Only uppercase letters A-Z are converted to lowercase.
staticdowncase_text(Text,LowerText)downcase_text(+text,-text) - oneOperators
(none)