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