jigdo API
net/uri.hh File Reference
Helper functions for dealing with URLs. More...
#include <config.h>
#include <string>
Go to the source code of this file.
Functions | |
void | uriJoin (string *dest, const string &base, const string &rel) |
Create a new URI from an absolute base URI and a relative URI. | |
unsigned | findLabelColon (const string &s) |
Return offset of first ':' in string if it is preceded by characters other than '/', space or control characters, otherwise return 0. | |
bool | isRealUrl (const string &s) |
Return true iff the absolute URL is a "real" HTTP/FTP/. | |
bool | isLabelUrl (const string &s) |
Return true iff the absolute URL is a Label:some/path URL, i.e. |
Detailed Description
Helper functions for dealing with URLs.
Function Documentation
unsigned findLabelColon | ( | const string & | s | ) |
Return offset of first ':' in string if it is preceded by characters other than '/', space or control characters, otherwise return 0.
Referenced by UrlMap::addPart(), UrlMap::addServer(), isLabelUrl(), and isRealUrl().
bool isLabelUrl | ( | const string & | s | ) |
Return true iff the absolute URL is a Label:some/path URL, i.e.
there's a colon before the first '/', and that colon is not followed by two slashes.
References findLabelColon().
bool isRealUrl | ( | const string & | s | ) |
Return true iff the absolute URL is a "real" HTTP/FTP/.
. url, as opposed to a label name followed by a path.
References findLabelColon().
Referenced by uriJoin().
void uriJoin | ( | string * | dest, | |
const string & | base, | |||
const string & | rel | |||
) |
Create a new URI from an absolute base URI and a relative URI.
(rel can also be absolute, in this case, the result in dest equals rel.)
References Assert, compat_compare(), isRealUrl(), and r.
Referenced by UrlMap::addPart(), UrlMap::addServer(), and testUriJoin().
Generated on Tue Sep 23 14:27:42 2008 for jigdo by
