is_valid_url: Assert that a URL is complete and valid

View source: R/internal_functions.R

is_valid_urlR Documentation

Assert that a URL is complete and valid

Description

Assert that a URL is complete and valid

Usage

is_valid_url(string)

Arguments

string

(Character) A URL to check.

Details

The regex I use is "@stephenhay" from https://mathiasbynens.be/demo/url-regex because it's the shortest regex that matches every CRAN mirror at https://cran.r-project.org/mirrors.html.

Value

A logical value, TRUE if the URL is valid, FALSE if otherwise.

Examples

## Not run: 
is_valid_url("http://rstudio.com")

## End(Not run)


DesiQuintans/librarian documentation built on Dec. 29, 2024, 10:59 p.m.