1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
misc useful functions
=====================
URL
---
// TODO should handle data URLs also (with content type and data)
typedef neturlinfo = (
bool is_valid,
lstring scheme,
lstring username,
lstring password,
lstring host,
bool is_ipaddr,
int port,
lstring path,
lstring query,
lstring fragment,
);
typedef dataurlinfo = (
bool is_valid,
lstring content_type,
lstring b64data, // TODO or are there multiple encodings?
);
// TODO ownership of strings?
bool url_is_scheme(string ^url, string^ scheme);
count url_check_scheme(string ^url, string^#[num] schemes, count num);
neturlinfo url_split_net_url(string ^url);
dataurlinfo url_split_data_url(string ^url);
E-mail parsing
--------------
TODO. includes MIME etc.
Misc encodings
--------------
Base64
Hex
|