Extract filenames from a URLs
Get the base names of URLs via basename()
, and remove the
possible query parameters or hash from the names.
url_filename(x)
x |
A character vector of URLs. |
A character vector of filenames at the end of URLs.
xfun::url_filename("https://yihui.org/images/logo.png") xfun::url_filename("https://yihui.org/index.html") xfun::url_filename("https://yihui.org/index.html?foo=bar") xfun::url_filename("https://yihui.org/index.html#about")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.