fileNameFromURL

Return a likely base file name given a URL, stripping the host/port/path and query string.

string
fileNameFromURL
(
string url
)

Examples

t
{
	assert(fileNameFromURL("http://example.com/index.html") == "index.html");
	assert(fileNameFromURL("http://example.com/dir/index.html") == "index.html");
	assert(fileNameFromURL("http://example.com/script.php?path=a/b/c") == "script.php"

Meta