File: url_filename.Rd

package info (click to toggle)
r-cran-xfun 0.20-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 680 kB
  • sloc: ansic: 242; sh: 22; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 679 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paths.R
\name{url_filename}
\alias{url_filename}
\title{Extract filenames from a URLs}
\usage{
url_filename(x)
}
\arguments{
\item{x}{A character vector of URLs.}
}
\value{
A character vector of filenames at the end of URLs.
}
\description{
Get the base names of URLs via \code{\link{basename}()}, and remove the
possible query parameters or hash from the names.
}
\examples{
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")
}