Skip to content

Commit

Permalink
Update urls
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Aug 20, 2022
1 parent cd357f9 commit 1c42b8d
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Description: A consistent, simple and easy to use set of
"NA"'s and zero length vectors in the same way, and the output from
one function is easy to feed into the input of another.
License: GPL-2 | file LICENSE
URL: http://stringr.tidyverse.org,
URL: https://stringr.tidyverse.org,
https://github.com/tidyverse/stringr
BugReports: https://github.com/tidyverse/stringr/issues
Depends:
Expand Down
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Hot patch release to resolve R CMD check failures.
## New features

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

* `str_flatten()` is a wrapper around `stri_flatten()` and clearly
Expand Down Expand Up @@ -133,7 +133,7 @@ Hot patch release to resolve R CMD check failures.

# stringr 1.0.0

* stringr is now powered by [stringi](https://github.com/Rexamine/stringi)
* stringr is now powered by [stringi](https://github.com/gagolews/stringi)
instead of base R regular expressions. This improves unicode and support, and
makes most operations considerably faster. If you find stringr inadequate for
your string processing needs, I highly recommend looking at stringi in more
Expand Down
8 changes: 4 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ library(stringr)
[![CRAN status](https://www.r-pkg.org/badges/version/stringr)](https://cran.r-project.org/package=stringr)
[![Travis build status](https://travis-ci.org/tidyverse/stringr.svg?branch=master)](https://travis-ci.org/tidyverse/stringr)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/tidyverse/stringr?branch=master&svg=true)](https://ci.appveyor.com/project/tidyverse/stringr)
[![Codecov test coverage](https://codecov.io/gh/tidyverse/stringr/branch/master/graph/badge.svg)](https://codecov.io/gh/tidyverse/stringr?branch=master)
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable)
[![Codecov test coverage](https://codecov.io/gh/tidyverse/stringr/branch/master/graph/badge.svg)](https://app.codecov.io/gh/tidyverse/stringr?branch=master)
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
<!-- badges: end -->

## Overview

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 provide 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.
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 provide 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.

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.
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.

## Installation

Expand Down
54 changes: 27 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ status](https://travis-ci.org/tidyverse/stringr.svg?branch=master)](https://trav
[![AppVeyor Build
Status](https://ci.appveyor.com/api/projects/status/github/tidyverse/stringr?branch=master&svg=true)](https://ci.appveyor.com/project/tidyverse/stringr)
[![Codecov test
coverage](https://codecov.io/gh/tidyverse/stringr/branch/master/graph/badge.svg)](https://codecov.io/gh/tidyverse/stringr?branch=master)
coverage](https://codecov.io/gh/tidyverse/stringr/branch/master/graph/badge.svg)](https://app.codecov.io/gh/tidyverse/stringr?branch=master)
[![Lifecycle:
stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable)
stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
<!-- badges: end -->

## Overview
Expand All @@ -24,11 +24,11 @@ play a big role in many data cleaning and preparation tasks. The stringr
package provide 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.
strings](https://r4ds.had.co.nz/strings.html) in R for Data Science.

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
[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
Expand Down Expand Up @@ -79,30 +79,30 @@ str_count(x, "[aeiou]")

There are seven main verbs that work with patterns:

- `str_detect(x, pattern)` tells you if there’s any match to the
- `str_detect(x, pattern)` tells you if there’s any match to the
pattern.

``` r
str_detect(x, "[aeiou]")
#> [1] FALSE TRUE TRUE TRUE TRUE TRUE
```

- `str_count(x, pattern)` counts the number of patterns.
- `str_count(x, pattern)` counts the number of patterns.

``` r
str_count(x, "[aeiou]")
#> [1] 0 3 1 2 2 4
```

- `str_subset(x, pattern)` extracts the matching components.
- `str_subset(x, pattern)` extracts the matching components.

``` r
str_subset(x, "[aeiou]")
#> [1] "video" "cross" "extra" "deal" "authority"
```

- `str_locate(x, pattern)` gives the position of the match.
- `str_locate(x, pattern)` gives the position of the match.

``` r
str_locate(x, "[aeiou]")
#> start end
Expand All @@ -114,16 +114,16 @@ There are seven main verbs that work with patterns:
#> [6,] 1 1
```

- `str_extract(x, pattern)` extracts the text of the match.
- `str_extract(x, pattern)` extracts the text of the match.

``` r
str_extract(x, "[aeiou]")
#> [1] NA "i" "o" "e" "e" "a"
```

- `str_match(x, pattern)` extracts parts of the match defined by
- `str_match(x, pattern)` extracts parts of the match defined by
parentheses.

``` r
# extract the characters on either side of the vowel
str_match(x, "(.)[aeiou](.)")
Expand All @@ -136,16 +136,16 @@ There are seven main verbs that work with patterns:
#> [6,] "aut" "a" "t"
```

- `str_replace(x, pattern, replacement)` replaces the matches with new
- `str_replace(x, pattern, replacement)` replaces the matches with new
text.

``` r
str_replace(x, "[aeiou]", "?")
#> [1] "why" "v?deo" "cr?ss" "?xtra" "d?al" "?uthority"
```

- `str_split(x, pattern)` splits up a string into multiple pieces.
- `str_split(x, pattern)` splits up a string into multiple pieces.

``` r
str_split(c("a,b", "c,d,e"), ",")
#> [[1]]
Expand All @@ -158,9 +158,9 @@ There are seven main verbs that work with patterns:
As well as regular expressions (the default), there are three other
pattern matching engines:

- `fixed()`: match exact bytes
- `coll()`: match human letters
- `boundary()`: match boundaries
- `fixed()`: match exact bytes
- `coll()`: match human letters
- `boundary()`: match boundaries

## RStudio Addin

Expand All @@ -187,10 +187,10 @@ learn. Additionally, they lag behind the string operations in other
programming languages, so that some things that are easy to do in
languages like Ruby or Python are rather hard to do in R.

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

``` r
letters %>%
.[1:10] %>%
Expand All @@ -199,9 +199,9 @@ languages like Ruby or Python are rather hard to do in R.
#> [1] "a b" "b c" "c d" "d e" "e f" "f g" "g h" "h i" "i j" "j k"
```

- Simplifies string operations by eliminating options that you dont
- Simplifies string operations by eliminating options that you dont
need 95% of the time.

- Produces outputs than can easily be used as inputs. This includes
- Produces outputs than can easily be used as inputs. This includes
ensuring that missing inputs result in missing outputs, and zero
length inputs result in zero length outputs.
2 changes: 1 addition & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ home:
strip_header: true
links:
- text: Learn more at R4DS
href: http://r4ds.had.co.nz/strings.html
href: https://r4ds.had.co.nz/strings.html

navbar:
left:
Expand Down
2 changes: 1 addition & 1 deletion man/stringr-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vignettes/regular-expressions.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ knitr::opts_chunk$set(
library(stringr)
```

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://amzn.com/0596528124) by Jeffrey E. F. Friedl.
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/dp/0596528124) by Jeffrey E. F. Friedl.

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()`:

Expand Down

0 comments on commit 1c42b8d

Please sign in to comment.