stringr: Simple, Consistent Wrappers for Common String Operations

A consistent, simple and easy to use set of wrappers around the fantastic 'stringi' package. All function and argument names (and positions) are consistent, all functions deal with "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.

Author
Hadley Wickham [aut, cre, cph], RStudio [cph]
Date of publication
2016-08-19 21:02:58
Maintainer
Hadley Wickham <hadley@rstudio.com>
License
GPL-2
Version
1.1.0
URLs

View on CRAN

Man pages

case
Convert case of a string.
invert_match
Switch location of matches to location of non-matches.
modifier-deprecated
Deprecated modifier functions.
modifiers
Control matching behaviour with modifier functions.
pipe
Pipe operator
str_c
Join multiple strings into a single string.
str_conv
Specify the encoding of a string.
str_count
Count the number of matches in a string.
str_detect
Detect the presence or absence of a pattern in a string.
str_dup
Duplicate and concatenate strings within a character vector.
str_extract
Extract matching patterns from a string.
stringr-data
Sample character vectors for practicing string manipulations.
str_interp
String interpolation.
str_length
The length of a string.
str_locate
Locate the position of patterns in a string.
str_match
Extract matched groups from a string.
str_order
Order or sort a character vector.
str_pad
Pad a string.
str_replace
Replace matched patterns in a string.
str_replace_na
Turn NA into "NA"
str_split
Split up a string into pieces.
str_sub
Extract and replace substrings from a character vector.
str_subset
Keep strings matching a pattern.
str_trim
Trim whitespace from start and end of string.
str_trunc
Truncate a character string.
str_view
View HTML rendering of regular expression match.
str_wrap
Wrap strings into nicely formatted paragraphs.
word
Extract words from a sentence.

Files in this package

stringr
stringr/inst
stringr/inst/htmlwidgets
stringr/inst/htmlwidgets/str_view.js
stringr/inst/htmlwidgets/lib
stringr/inst/htmlwidgets/lib/str_view.css
stringr/inst/htmlwidgets/str_view.yaml
stringr/inst/doc
stringr/inst/doc/stringr.R
stringr/inst/doc/stringr.html
stringr/inst/doc/stringr.Rmd
stringr/tests
stringr/tests/testthat.R
stringr/tests/testthat
stringr/tests/testthat/test-trim.r
stringr/tests/testthat/test-replace.r
stringr/tests/testthat/test-sub.r
stringr/tests/testthat/test-length.r
stringr/tests/testthat/test-interp.r
stringr/tests/testthat/test-word.r
stringr/tests/testthat/test-extract.r
stringr/tests/testthat/test-wrap.r
stringr/tests/testthat/test-subset.r
stringr/tests/testthat/test-detect.r
stringr/tests/testthat/test-split.r
stringr/tests/testthat/test-match.r
stringr/tests/testthat/test-dup.r
stringr/tests/testthat/test-pad.r
stringr/tests/testthat/test-locate.r
stringr/tests/testthat/test-count.r
stringr/tests/testthat/test-join.r
stringr/NAMESPACE
stringr/NEWS.md
stringr/data
stringr/data/fruit.rda
stringr/data/sentences.rda
stringr/data/words.rda
stringr/R
stringr/R/utils.R
stringr/R/wrap.r
stringr/R/subset.R
stringr/R/case.R
stringr/R/split.r
stringr/R/conv.R
stringr/R/length.r
stringr/R/modifiers.r
stringr/R/sort.R
stringr/R/data.R
stringr/R/word.r
stringr/R/locate.r
stringr/R/sub.r
stringr/R/dup.r
stringr/R/pad-trim.r
stringr/R/count.r
stringr/R/interp.R
stringr/R/detect.r
stringr/R/match.r
stringr/R/view.R
stringr/R/extract.r
stringr/R/replace.r
stringr/R/c.r
stringr/vignettes
stringr/vignettes/stringr.Rmd
stringr/README.md
stringr/MD5
stringr/build
stringr/build/vignette.rds
stringr/DESCRIPTION
stringr/man
stringr/man/word.Rd
stringr/man/str_sub.Rd
stringr/man/str_length.Rd
stringr/man/str_trunc.Rd
stringr/man/pipe.Rd
stringr/man/str_trim.Rd
stringr/man/str_conv.Rd
stringr/man/str_replace_na.Rd
stringr/man/str_subset.Rd
stringr/man/str_split.Rd
stringr/man/stringr-data.Rd
stringr/man/str_c.Rd
stringr/man/str_count.Rd
stringr/man/case.Rd
stringr/man/str_replace.Rd
stringr/man/str_wrap.Rd
stringr/man/str_pad.Rd
stringr/man/invert_match.Rd
stringr/man/str_dup.Rd
stringr/man/str_locate.Rd
stringr/man/str_detect.Rd
stringr/man/modifier-deprecated.Rd
stringr/man/str_order.Rd
stringr/man/str_view.Rd
stringr/man/str_extract.Rd
stringr/man/str_match.Rd
stringr/man/modifiers.Rd
stringr/man/str_interp.Rd