Does the input contain a URL?
Details
This assert check is intended to be simple and does not check to see if the
URL exists (is active). For that, refer to isExistingUrl
instead.
Functions
isUrl()
: Vectorized.isAUrl()
: Scalar. Requires a single URL.allAreUrls()
: Scalar. Checks that all strings are URLs.
Examples
urls <- c("https://www.r-project.org/", "ftp://r-project.org/")
## TRUE ====
isUrl(urls)
#> [1] TRUE TRUE
isAUrl(urls[[1L]])
#> [1] TRUE
allAreUrls(urls)
#> [1] TRUE
## FALSE ====
isUrl("xxx")
#> [1] FALSE
isAUrl(urls)
#> [1] FALSE