Skip to content

Commit fee4b70

Browse files
committed
urlchecker::url_check()
1 parent 7e83a80 commit fee4b70

File tree

7 files changed

+107
-107
lines changed

7 files changed

+107
-107
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Description: A consistent, simple and easy to use set of wrappers around
1414
length vectors in the same way, and the output from one function is
1515
easy to feed into the input of another.
1616
License: MIT + file LICENSE
17-
URL: http://stringr.tidyverse.org, https://github.com/tidyverse/stringr
17+
URL: https://stringr.tidyverse.org, https://github.com/tidyverse/stringr
1818
BugReports: https://github.com/tidyverse/stringr/issues
1919
Depends:
2020
R (>= 3.3)

NEWS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Hot patch release to resolve R CMD check failures.
142142
## New features
143143

144144
* `str_glue()` and `str_glue_data()` provide convenient wrappers around
145-
`glue` and `glue_data()` from the [glue](http://glue.tidyverse.org/) package
145+
`glue` and `glue_data()` from the [glue](https://glue.tidyverse.org/) package
146146
(#157).
147147

148148
* `str_flatten()` is a wrapper around `stri_flatten()` and clearly
@@ -236,7 +236,7 @@ Hot patch release to resolve R CMD check failures.
236236

237237
# stringr 1.0.0
238238

239-
* stringr is now powered by [stringi](https://github.com/Rexamine/stringi)
239+
* stringr is now powered by [stringi](https://github.com/gagolews/stringi)
240240
instead of base R regular expressions. This improves unicode and support, and
241241
makes most operations considerably faster. If you find stringr inadequate for
242242
your string processing needs, I highly recommend looking at stringi in more

README.Rmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ library(stringr)
1818
<!-- badges: start -->
1919
[![CRAN status](https://www.r-pkg.org/badges/version/stringr)](https://cran.r-project.org/package=stringr)
2020
[![R-CMD-check](https://github.com/tidyverse/stringr/workflows/R-CMD-check/badge.svg)](https://github.com/tidyverse/stringr/actions)
21-
[![Codecov test coverage](https://codecov.io/gh/tidyverse/stringr/branch/main/graph/badge.svg)](https://codecov.io/gh/tidyverse/stringr?branch=main)
22-
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable)
21+
[![Codecov test coverage](https://codecov.io/gh/tidyverse/stringr/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tidyverse/stringr?branch=main)
22+
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
2323
<!-- badges: end -->
2424

2525
## Overview
2626

27-
Strings are not glamorous, high-profile components of R, but they do play a big role in many data cleaning and preparation tasks. The stringr package provides a cohesive set of functions designed to make working with strings as easy as possible. If you're not familiar with strings, the best place to start is the [chapter on strings](http://r4ds.had.co.nz/strings.html) in R for Data Science.
27+
Strings are not glamorous, high-profile components of R, but they do play a big role in many data cleaning and preparation tasks. The stringr package provides a cohesive set of functions designed to make working with strings as easy as possible. If you're not familiar with strings, the best place to start is the [chapter on strings](https://r4ds.had.co.nz/strings.html) in R for Data Science.
2828

29-
stringr is built on top of [stringi](https://github.com/gagolews/stringi), which uses the [ICU](http://site.icu-project.org) C library to provide fast, correct implementations of common string manipulations. stringr focusses on the most important and commonly used string manipulation functions whereas stringi provides a comprehensive set covering almost anything you can imagine. If you find that stringr is missing a function that you need, try looking in stringi. Both packages share similar conventions, so once you've mastered stringr, you should find stringi similarly easy to use.
29+
stringr is built on top of [stringi](https://github.com/gagolews/stringi), which uses the [ICU](https://icu.unicode.org) C library to provide fast, correct implementations of common string manipulations. stringr focusses on the most important and commonly used string manipulation functions whereas stringi provides a comprehensive set covering almost anything you can imagine. If you find that stringr is missing a function that you need, try looking in stringi. Both packages share similar conventions, so once you've mastered stringr, you should find stringi similarly easy to use.
3030

3131
## Installation
3232

README.md

Lines changed: 97 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
status](https://www.r-pkg.org/badges/version/stringr)](https://cran.r-project.org/package=stringr)
1010
[![R-CMD-check](https://github.com/tidyverse/stringr/workflows/R-CMD-check/badge.svg)](https://github.com/tidyverse/stringr/actions)
1111
[![Codecov test
12-
coverage](https://codecov.io/gh/tidyverse/stringr/branch/main/graph/badge.svg)](https://codecov.io/gh/tidyverse/stringr?branch=main)
12+
coverage](https://codecov.io/gh/tidyverse/stringr/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tidyverse/stringr?branch=main)
1313
[![Lifecycle:
14-
stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable)
14+
stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
1515
<!-- badges: end -->
1616

1717
## Overview
@@ -21,11 +21,11 @@ play a big role in many data cleaning and preparation tasks. The stringr
2121
package provides a cohesive set of functions designed to make working
2222
with strings as easy as possible. If you’re not familiar with strings,
2323
the best place to start is the [chapter on
24-
strings](http://r4ds.had.co.nz/strings.html) in R for Data Science.
24+
strings](https://r4ds.had.co.nz/strings.html) in R for Data Science.
2525

2626
stringr is built on top of
2727
[stringi](https://github.com/gagolews/stringi), which uses the
28-
[ICU](http://site.icu-project.org) C library to provide fast, correct
28+
[ICU](https://icu.unicode.org) C library to provide fast, correct
2929
implementations of common string manipulations. stringr focusses on the
3030
most important and commonly used string manipulation functions whereas
3131
stringi provides a comprehensive set covering almost anything you can
@@ -75,88 +75,88 @@ str_count(x, "[aeiou]")
7575

7676
There are seven main verbs that work with patterns:
7777

78-
- `str_detect(x, pattern)` tells you if there’s any match to the
79-
pattern:
80-
81-
``` r
82-
str_detect(x, "[aeiou]")
83-
#> [1] FALSE TRUE TRUE TRUE TRUE TRUE
84-
```
85-
86-
- `str_count(x, pattern)` counts the number of patterns:
87-
88-
``` r
89-
str_count(x, "[aeiou]")
90-
#> [1] 0 3 1 2 2 4
91-
```
92-
93-
- `str_subset(x, pattern)` extracts the matching components:
94-
95-
``` r
96-
str_subset(x, "[aeiou]")
97-
#> [1] "video" "cross" "extra" "deal" "authority"
98-
```
99-
100-
- `str_locate(x, pattern)` gives the position of the match:
101-
102-
``` r
103-
str_locate(x, "[aeiou]")
104-
#> start end
105-
#> [1,] NA NA
106-
#> [2,] 2 2
107-
#> [3,] 3 3
108-
#> [4,] 1 1
109-
#> [5,] 2 2
110-
#> [6,] 1 1
111-
```
112-
113-
- `str_extract(x, pattern)` extracts the text of the match:
114-
115-
``` r
116-
str_extract(x, "[aeiou]")
117-
#> [1] NA "i" "o" "e" "e" "a"
118-
```
119-
120-
- `str_match(x, pattern)` extracts parts of the match defined by
121-
parentheses:
122-
123-
``` r
124-
# extract the characters on either side of the vowel
125-
str_match(x, "(.)[aeiou](.)")
126-
#> [,1] [,2] [,3]
127-
#> [1,] NA NA NA
128-
#> [2,] "vid" "v" "d"
129-
#> [3,] "ros" "r" "s"
130-
#> [4,] NA NA NA
131-
#> [5,] "dea" "d" "a"
132-
#> [6,] "aut" "a" "t"
133-
```
134-
135-
- `str_replace(x, pattern, replacement)` replaces the matches with new
136-
text:
137-
138-
``` r
139-
str_replace(x, "[aeiou]", "?")
140-
#> [1] "why" "v?deo" "cr?ss" "?xtra" "d?al" "?uthority"
141-
```
142-
143-
- `str_split(x, pattern)` splits up a string into multiple pieces:
144-
145-
``` r
146-
str_split(c("a,b", "c,d,e"), ",")
147-
#> [[1]]
148-
#> [1] "a" "b"
149-
#>
150-
#> [[2]]
151-
#> [1] "c" "d" "e"
152-
```
78+
- `str_detect(x, pattern)` tells you if there’s any match to the
79+
pattern:
80+
81+
``` r
82+
str_detect(x, "[aeiou]")
83+
#> [1] FALSE TRUE TRUE TRUE TRUE TRUE
84+
```
85+
86+
- `str_count(x, pattern)` counts the number of patterns:
87+
88+
``` r
89+
str_count(x, "[aeiou]")
90+
#> [1] 0 3 1 2 2 4
91+
```
92+
93+
- `str_subset(x, pattern)` extracts the matching components:
94+
95+
``` r
96+
str_subset(x, "[aeiou]")
97+
#> [1] "video" "cross" "extra" "deal" "authority"
98+
```
99+
100+
- `str_locate(x, pattern)` gives the position of the match:
101+
102+
``` r
103+
str_locate(x, "[aeiou]")
104+
#> start end
105+
#> [1,] NA NA
106+
#> [2,] 2 2
107+
#> [3,] 3 3
108+
#> [4,] 1 1
109+
#> [5,] 2 2
110+
#> [6,] 1 1
111+
```
112+
113+
- `str_extract(x, pattern)` extracts the text of the match:
114+
115+
``` r
116+
str_extract(x, "[aeiou]")
117+
#> [1] NA "i" "o" "e" "e" "a"
118+
```
119+
120+
- `str_match(x, pattern)` extracts parts of the match defined by
121+
parentheses:
122+
123+
``` r
124+
# extract the characters on either side of the vowel
125+
str_match(x, "(.)[aeiou](.)")
126+
#> [,1] [,2] [,3]
127+
#> [1,] NA NA NA
128+
#> [2,] "vid" "v" "d"
129+
#> [3,] "ros" "r" "s"
130+
#> [4,] NA NA NA
131+
#> [5,] "dea" "d" "a"
132+
#> [6,] "aut" "a" "t"
133+
```
134+
135+
- `str_replace(x, pattern, replacement)` replaces the matches with new
136+
text:
137+
138+
``` r
139+
str_replace(x, "[aeiou]", "?")
140+
#> [1] "why" "v?deo" "cr?ss" "?xtra" "d?al" "?uthority"
141+
```
142+
143+
- `str_split(x, pattern)` splits up a string into multiple pieces:
144+
145+
``` r
146+
str_split(c("a,b", "c,d,e"), ",")
147+
#> [[1]]
148+
#> [1] "a" "b"
149+
#>
150+
#> [[2]]
151+
#> [1] "c" "d" "e"
152+
```
153153

154154
As well as regular expressions (the default), there are three other
155155
pattern matching engines:
156156

157-
- `fixed()`: match exact bytes
158-
- `coll()`: match human letters
159-
- `boundary()`: match boundaries
157+
- `fixed()`: match exact bytes
158+
- `coll()`: match human letters
159+
- `boundary()`: match boundaries
160160

161161
## RStudio Addin
162162

@@ -183,21 +183,21 @@ learn. Additionally, they lag behind the string operations in other
183183
programming languages, so that some things that are easy to do in
184184
languages like Ruby or Python are rather hard to do in R.
185185

186-
- Uses consistent function and argument names. The first argument is
187-
always the vector of strings to modify, which makes stringr work
188-
particularly well in conjunction with the pipe:
186+
- Uses consistent function and argument names. The first argument is
187+
always the vector of strings to modify, which makes stringr work
188+
particularly well in conjunction with the pipe:
189189

190-
``` r
191-
letters %>%
192-
.[1:10] %>%
193-
str_pad(3, "right") %>%
194-
str_c(letters[2:11])
195-
#> [1] "a b" "b c" "c d" "d e" "e f" "f g" "g h" "h i" "i j" "j k"
196-
```
190+
``` r
191+
letters %>%
192+
.[1:10] %>%
193+
str_pad(3, "right") %>%
194+
str_c(letters[2:11])
195+
#> [1] "a b" "b c" "c d" "d e" "e f" "f g" "g h" "h i" "i j" "j k"
196+
```
197197

198-
- Simplifies string operations by eliminating options that you dont
199-
need 95% of the time.
198+
- Simplifies string operations by eliminating options that you don’t
199+
need 95% of the time.
200200

201-
- Produces outputs than can easily be used as inputs. This includes
202-
ensuring that missing inputs result in missing outputs, and zero
203-
length inputs result in zero length outputs.
201+
- Produces outputs than can easily be used as inputs. This includes
202+
ensuring that missing inputs result in missing outputs, and zero
203+
length inputs result in zero length outputs.

man/stringr-package.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vignettes/from-base.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Overall the main differences between base R and stringr are:
6666
arguments, stringr instead uses helper functions (like `fixed()`,
6767
`regexp()`, and `coll()`).
6868

69-
Next we'll walk through each of the functions, noting the similarities and important differences. These examples come from the [stringr documentation](https://cran.r-project.org/web/packages/stringr/stringr.pdf) and here, they are contrasted with the analogous base R operation(s).
69+
Next we'll walk through each of the functions, noting the similarities and important differences. These examples are adapted from the stringr documentation and here they are contrasted with the analogous base R operations.
7070

7171
```{r setup}
7272
library(stringr)

vignettes/regular-expressions.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ knitr::opts_chunk$set(
1515
library(stringr)
1616
```
1717

18-
Regular expressions are a concise and flexible tool for describing patterns in strings. This vignette describes the key features of stringr's regular expressions, as implemented by [stringi](https://github.com/gagolews/stringi). It is not a tutorial, so if you're unfamiliar regular expressions, I'd recommend starting at <http://r4ds.had.co.nz/strings.html>. If you want to master the details, I'd recommend reading the classic [_Mastering Regular Expressions_](https://www.amazon.com/Mastering-Regular-Expressions-Jeffrey-Friedl/dp/0596528124) by Jeffrey E. F. Friedl.
18+
Regular expressions are a concise and flexible tool for describing patterns in strings. This vignette describes the key features of stringr's regular expressions, as implemented by [stringi](https://github.com/gagolews/stringi). It is not a tutorial, so if you're unfamiliar regular expressions, I'd recommend starting at <https://r4ds.had.co.nz/strings.html>. If you want to master the details, I'd recommend reading the classic [_Mastering Regular Expressions_](https://www.amazon.com/Mastering-Regular-Expressions-Jeffrey-Friedl/dp/0596528124) by Jeffrey E. F. Friedl.
1919

2020
Regular expressions are the default pattern engine in stringr. That means when you use a pattern matching function with a bare string, it's equivalent to wrapping it in a call to `regex()`:
2121

0 commit comments

Comments
 (0)