Package: stringr 1.5.1.9000

Hadley Wickham

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.

Authors:Hadley Wickham [aut, cre, cph], Posit Software, PBC [cph, fnd]

stringr_1.5.1.9000.tar.gz
stringr_1.5.1.9000.zip(r-4.5)stringr_1.5.1.9000.zip(r-4.4)stringr_1.5.1.9000.zip(r-4.3)
stringr_1.5.1.9000.tgz(r-4.4-any)stringr_1.5.1.9000.tgz(r-4.3-any)
stringr_1.5.1.9000.tar.gz(r-4.5-noble)stringr_1.5.1.9000.tar.gz(r-4.4-noble)
stringr_1.5.1.9000.tgz(r-4.4-emscripten)stringr_1.5.1.9000.tgz(r-4.3-emscripten)
stringr.pdf |stringr.html
stringr/json (API)
NEWS

# Install 'stringr' in R:
install.packages('stringr', repos = c('https://tidyverse.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/tidyverse/stringr/issues

Datasets:
  • fruit - Sample character vectors for practicing string manipulations
  • sentences - Sample character vectors for practicing string manipulations
  • words - Sample character vectors for practicing string manipulations

On CRAN:

regular-expressionstrings

60 exports 601 stars 22.15 score 7 dependencies 7756 dependents 172 mentions 162.3k scripts 1.1M downloads

Last updated 1 months agofrom:90f8ba7fc3. Checks:OK: 5 NOTE: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 19 2024
R-4.5-winNOTESep 19 2024
R-4.5-linuxNOTESep 19 2024
R-4.4-winOKSep 19 2024
R-4.4-macOKSep 19 2024
R-4.3-winOKSep 19 2024
R-4.3-macOKSep 19 2024

Exports:%>%boundarycollfixedinvert_matchregexstr_cstr_convstr_countstr_detectstr_dupstr_endsstr_equalstr_escapestr_extractstr_extract_allstr_flattenstr_flatten_commastr_gluestr_glue_datastr_ilikestr_interpstr_lengthstr_likestr_locatestr_locate_allstr_matchstr_match_allstr_orderstr_padstr_rankstr_removestr_remove_allstr_replacestr_replace_allstr_replace_nastr_sortstr_splitstr_split_1str_split_fixedstr_split_istr_squishstr_startsstr_substr_sub_allstr_sub<-str_subsetstr_to_lowerstr_to_sentencestr_to_titlestr_to_upperstr_trimstr_truncstr_uniquestr_viewstr_view_allstr_whichstr_widthstr_wrapword

Dependencies:cligluelifecyclemagrittrrlangstringivctrs

From base R

Rendered fromfrom-base.Rmdusingknitr::rmarkdownon Sep 19 2024.

Last update: 2024-07-15
Started: 2019-05-14

Introduction to stringr

Rendered fromstringr.Rmdusingknitr::rmarkdownon Sep 19 2024.

Last update: 2024-08-15
Started: 2014-11-28

Regular expressions

Rendered fromregular-expressions.Rmdusingknitr::rmarkdownon Sep 19 2024.

Last update: 2024-08-15
Started: 2016-10-16

Readme and manuals

Help Manual

Help pageTopics
Convert string to upper case, lower case, title case, or sentence casecase str_to_lower str_to_sentence str_to_title str_to_upper
Switch location of matches to location of non-matchesinvert_match
Control matching behaviour with modifier functionsboundary coll fixed modifiers regex
Join multiple strings into one stringstr_c
Specify the encoding of a stringstr_conv
Count number of matchesstr_count
Detect the presence/absence of a matchstr_detect
Duplicate a stringstr_dup
Determine if two strings are equivalentstr_equal
Escape regular expression metacharactersstr_escape
Extract the complete matchstr_extract str_extract_all
Flatten a stringstr_flatten str_flatten_comma
Interpolation with gluestr_glue str_glue_data
Compute the length/widthstr_length str_width
Detect a pattern in the same way as 'SQL''s 'LIKE' and 'ILIKE' operatorsstr_ilike str_like
Find location of matchstr_locate str_locate_all
Extract components (capturing groups) from a matchstr_match str_match_all
Order, rank, or sort a character vectorstr_order str_rank str_sort
Pad a string to minimum widthstr_pad
Remove matched patternsstr_remove str_remove_all
Replace matches with new textstr_replace str_replace_all
Turn NA into "NA"str_replace_na
Split up a string into piecesstr_split str_split_1 str_split_fixed str_split_i
Detect the presence/absence of a match at the start/endstr_ends str_starts
Get and set substrings using their positionsstr_sub str_sub<- str_sub_all
Find matching elementsstr_subset
Remove whitespacestr_squish str_trim
Truncate a string to maximum widthstr_trunc
Remove duplicated stringsstr_unique
View strings and matchesstr_view str_view_all
Find matching indicesstr_which
Wrap words into nicely formatted paragraphsstr_wrap
Sample character vectors for practicing string manipulationsfruit sentences stringr-data words
Extract words from a sentenceword