Package: strex 2.0.0

strex: Extra String Manipulation Functions

There are some things that I wish were easier with the 'stringr' or 'stringi' packages. The foremost of these is the extraction of numbers from strings. 'stringr' and 'stringi' make you figure out the regular expression for yourself; 'strex' takes care of this for you. There are many other handy functionalities in 'strex'. Contributions to this package are encouraged; it is intended as a miscellany of string manipulation functions that cannot be found in 'stringi' or 'stringr'.

Authors:Rory Nolan [aut, cre]

strex_2.0.0.tar.gz
strex_2.0.0.zip(r-4.5)strex_2.0.0.zip(r-4.4)strex_2.0.0.zip(r-4.3)
strex_2.0.0.tgz(r-4.4-x86_64)strex_2.0.0.tgz(r-4.4-arm64)strex_2.0.0.tgz(r-4.3-x86_64)strex_2.0.0.tgz(r-4.3-arm64)
strex_2.0.0.tar.gz(r-4.5-noble)strex_2.0.0.tar.gz(r-4.4-noble)
strex_2.0.0.tgz(r-4.4-emscripten)strex_2.0.0.tgz(r-4.3-emscripten)
strex.pdf |strex.html
strex/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/rorynolan/strex/issues

On CRAN:

57 exports 41 stars 4.15 score 10 dependencies 18 dependents 108 scripts 1.8k downloads

Last updated 8 months agofrom:c4b69e7ae5. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKAug 28 2024
R-4.5-win-x86_64OKAug 28 2024
R-4.5-linux-x86_64OKAug 28 2024
R-4.4-win-x86_64OKAug 28 2024
R-4.4-mac-x86_64OKAug 28 2024
R-4.4-mac-aarch64OKAug 28 2024
R-4.3-win-x86_64OKAug 28 2024
R-4.3-mac-x86_64OKAug 28 2024
R-4.3-mac-aarch64OKAug 28 2024

Exports:match_argstr_after_firststr_after_laststr_after_nthstr_alphord_numsstr_before_firststr_before_laststr_before_last_dotstr_before_nthstr_can_be_numericstr_detect_allstr_detect_anystr_elemstr_elemsstr_extract_currenciesstr_extract_non_numericsstr_extract_numbersstr_first_currencystr_first_non_numericstr_first_numberstr_first_number_after_firststr_first_number_after_laststr_first_number_after_mthstr_first_number_before_firststr_first_number_before_laststr_first_number_before_mthstr_give_extstr_last_currencystr_last_non_numericstr_last_numberstr_last_number_after_firststr_last_number_after_laststr_last_number_after_mthstr_last_number_before_firststr_last_number_before_laststr_last_number_before_mthstr_locate_bracesstr_locate_firststr_locate_laststr_locate_nthstr_match_argstr_nth_currencystr_nth_non_numericstr_nth_numberstr_nth_number_after_firststr_nth_number_after_laststr_nth_number_after_mthstr_nth_number_before_firststr_nth_number_before_laststr_nth_number_before_mthstr_paste_elemsstr_remove_quotedstr_singleizestr_split_by_numbersstr_split_camel_casestr_to_vecstr_trim_anything

Dependencies:backportscheckmatecligluelifecyclemagrittrrlangstringistringrvctrs

Alphordering Numbers

Rendered fromalphordering-numbers.Rmdusingknitr::rmarkdownon Aug 28 2024.

Last update: 2024-01-28
Started: 2018-08-29

And/Or Detection

Rendered fromdetection.Rmdusingknitr::rmarkdownon Aug 28 2024.

Last update: 2023-01-04
Started: 2022-12-31

Argument Matching

Rendered fromargument-matching.Rmdusingknitr::rmarkdownon Aug 28 2024.

Last update: 2019-04-29
Started: 2018-08-29

Before and After

Rendered frombefore-and-after.Rmdusingknitr::rmarkdownon Aug 28 2024.

Last update: 2024-01-28
Started: 2018-08-29

Important Miscellany

Rendered fromimportant-miscellany.Rmdusingknitr::rmarkdownon Aug 28 2024.

Last update: 2024-01-28
Started: 2018-08-29

Numbers Within Strings

Rendered fromnumbers-in-strings.Rmdusingknitr::rmarkdownon Aug 28 2024.

Last update: 2024-01-28
Started: 2018-08-29

Readme and manuals

Help Manual

Help pageTopics
Extract text before or after 'n'th occurrence of pattern.before-and-after str_after_first str_after_last str_after_nth str_before_first str_before_last str_before_nth
Extract currency amounts from a string.currency str_extract_currencies str_first_currency str_last_currency str_nth_currency
Make string numbers comply with alphabetical order.str_alphord_nums
Extract the part of a string before the last period.str_before_last_dot
Check if a string could be considered as numeric.str_can_be_numeric
Detect any or all patterns.str_detect_all str_detect_any
Extract a single character from a string, using its index.str_elem
Extract several single elements from a string.str_elems
Extract non-numbers from a string.str_extract_non_numerics
Extract numbers from a string.str_extract_numbers
Ensure a file name has the intended extension.str_give_ext
Locate the braces in a string.str_locate_braces
Locate the indices of the 'n'th instance of a pattern.str_locate_first str_locate_last str_locate_nth
Argument Matching.match_arg str_match_arg
Extract the 'n'th non-numeric substring from a string.str_first_non_numeric str_last_non_numeric str_nth_non_numeric
Extract the 'n'th number from a string.str_first_number str_last_number str_nth_number
Find the 'n'th number after the 'm'th occurrence of a pattern.str_first_number_after_first str_first_number_after_last str_first_number_after_mth str_last_number_after_first str_last_number_after_last str_last_number_after_mth str_nth_number_after_first str_nth_number_after_last str_nth_number_after_mth
Find the 'n'th number before the 'm'th occurrence of a pattern.str_first_number_before_first str_first_number_before_last str_first_number_before_mth str_last_number_before_first str_last_number_before_last str_last_number_before_mth str_nth_number_before_first str_nth_number_before_last str_nth_number_before_mth
Extract single elements of a string and paste them together.str_paste_elems
Remove the quoted parts of a string.str_remove_quoted
Remove back-to-back duplicates of a pattern in a string.str_singleize
Split a string by its numeric characters.str_split_by_numbers
Split a string based on CamelCase.str_split_camel_case
Convert a string to a vector of charactersstr_to_vec
Trim something other than whitespacestr_trim_anything
'strex': extra string manipulation functionsstrex-package strex