list_extract_uris


Description:

[ Version ( since = "2.6" ) ]
[ CCode ( array_length = false , array_null_terminated = true ) ]
public static string[] list_extract_uris (string uri_list)

Example: Split an URI list:

public static int main (string[] args) {
string uri_list = """# comment
http://example.org/absolute/URI/absolute/path/to/resource1.txt
http://example.org/absolute/URI/absolute/path/to/resource2.txt

http://example.org/absolute/URI/absolute/path/to/resource3.txt
"""
;


// Output:
// ``Uri: http://example.org/absolute/URI/absolute/path/to/resource1.txt``
// ``Uri: http://example.org/absolute/URI/absolute/path/to/resource2.txt``
// ``Uri: http://example.org/absolute/URI/absolute/path/to/resource3.txt``
string[] uris = Uri.list_extract_uris (uri_list);
foreach (string uri in uris) {
print ("Uri: %s\n", uri);
}

return 0;
}

valac --pkg glib-2.0 GLib.Uri.list_extract_uris.vala