Extract a normalized directory path from a URL.
returnedStr = urlbase(urlStr)
returnedStr - type: str
urlStr - type: str
The normalized URL ending in directory path.
As an aid to converting relative URLs to absolute URLs when processing a web page.
@CODE
"output.txt" << urlbase("http://www.x.com/pqr/a.txt") << "\n";
"output.txt" << urlbase("http://www.abc.com/") << "\n";
"output.txt" << urlbase("http://www.x.com/pqr/") << "\n";
prints out:
http://www.x.com/pqr
http://www.abc.com
http://www.x.com/pqr