Did you know ... Search Documentation:
Pack canny_tudor -- prolog/canny/url.pl
PublicShow source
 url_encoded(?Code)// is nondet
Similar to uri_encoded/3 but simpler.

URL encodes a Code. Uses the C-symbol code type (including letters, digits and underscores) conservatively to determine whether or not to encode to percentage-prefixed hexadecimal. Liberally decodes by accepting any code except the percentage code. Percents must decode with a pair of hexadecimal digits; decoding otherwise fails.

Arguments:
Code- is a character code.
 url_coded(?Decoded, ?Encoded) is semidet
Encodes or decodes a sequence of codes. Uses url_encoded//1 to perform the encoding or decoding. Succeeds once.

Examples:

?- url_coded(`Hello_World!`, Encoded). Encoded = Hello_World%21. ?- url_coded(Decoded, `Hello_World%21`). Decoded = `Hello_World!`.

Arguments:
Decoded- is a list of character codes.
Encoded- is a list of character codes.