Package: strex 2.1.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.1.0.tar.gz
strex_2.1.0.zip(r-4.7)strex_2.1.0.zip(r-4.6)strex_2.1.0.zip(r-4.5)
strex_2.1.0.tgz(r-4.6-x86_64)strex_2.1.0.tgz(r-4.6-arm64)strex_2.1.0.tgz(r-4.5-x86_64)strex_2.1.0.tgz(r-4.5-arm64)
strex_2.1.0.tar.gz(r-4.7-arm64)strex_2.1.0.tar.gz(r-4.7-x86_64)strex_2.1.0.tar.gz(r-4.6-arm64)strex_2.1.0.tar.gz(r-4.6-x86_64)
strex_2.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
strex/json (API)

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

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

Pkgdown/docs site:https://rorynolan.github.io

On CRAN:

Conda:

10.24 score 40 stars 20 packages 746 scripts 1.6k downloads 57 exports 10 dependencies

Last updated from:2ecbec20a4. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK180
linux-devel-x86_64OK133
source / vignettesOK248
linux-release-arm64OK151
linux-release-x86_64OK133
macos-release-arm64OK73
macos-release-x86_64OK216
macos-oldrel-arm64OK77
macos-oldrel-x86_64OK252
windows-develOK111
windows-releaseOK106
windows-oldrelOK105
wasm-releaseOK149

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
Numbers don't comply with alphabetical order | Alphordering numbers

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

Before and After
Before | After | A more concrete example

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

Important Miscellany
The Importance of this miscellany | Could this be numeric? | Currency | Extract a single element of a string | Extract numbers and non-numeric elements | Split a string by its numbers | Force a file name to have an extension | Strip away a file extension | Remove quoted bits from a string | Split camel case | Convert a string to a vector | Trim anything, not just whitespace | Remove duplicated bits of strings

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

Numbers Within Strings
A common way to encode numerical data | All of the numbers | Extract specific numbers | The n^th^ number | Numbers after patterns | Numbers before patterns | Tidy number extraction | Other number formats | All of the number functions | Regular expression

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

And/Or Detection
How it works | Examples | Performance

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

Argument Matching
Ignoring case | base | strex | Error Messages | No matches | Multiple matches | Wrong arg length | Duplicate elements in choices | Not specifying choices

Last update: 2019-04-29
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