URLEncode¶
Functions for checking, encoding, and decoding parts of URLs.
Constructors¶
create¶
Returns¶
- URLEncode val^
Public Functions¶
encode¶
URL encode and normilase the given string. The percent_encoded parameter indicates how '%' characters should be interpretted. true => given string is already at least partially encoded, so '%'s indicate an encoded character. false => given string is not yet encoded at all, so '%'s are just '%'s. An error is raised on invalid existing encoding or illegal characters that cannot be encoded.
fun box encode(
from: String val,
part: (URLPartUser val | URLPartPassword val | URLPartHost val |
URLPartPath val | URLPartQuery val | URLPartFragment val),
percent_encoded: Bool val = true)
: String val ?
Parameters¶
- from: String val
- part: (URLPartUser val | URLPartPassword val | URLPartHost val | URLPartPath val | URLPartQuery val | URLPartFragment val)
- percent_encoded: Bool val = true
Returns¶
- String val ?
decode¶
URL decode a string. Raise an error on invalid URL encoded.
Parameters¶
- from: String val
Returns¶
- String val ?
check_scheme¶
Check that the given string is a valid scheme.
Parameters¶
- scheme: String val
Returns¶
- Bool val
check¶
Check that the given string is valid to be the given URL part without further encoding. Canonical form is not checked for, merely validity.
fun box check(
from: String val,
part: (URLPartUser val | URLPartPassword val | URLPartHost val |
URLPartPath val | URLPartQuery val | URLPartFragment val))
: Bool val
Parameters¶
- from: String val
- part: (URLPartUser val | URLPartPassword val | URLPartHost val | URLPartPath val | URLPartQuery val | URLPartFragment val)
Returns¶
- Bool val
eq¶
Parameters¶
- that: URLEncode val
Returns¶
- Bool val
ne¶
Parameters¶
- that: URLEncode val
Returns¶
- Bool val