Package: stringx 0.2.8

stringx: Replacements for Base String Functions Powered by 'stringi'

English is the native language for only 5% of the World population. Also, only 17% of us can understand this text. Moreover, the Latin alphabet is the main one for merely 36% of the total. The early computer era, now a very long time ago, was dominated by the US. Due to the proliferation of the internet, smartphones, social media, and other technologies and communication platforms, this is no longer the case. This package replaces base R string functions (such as grep(), tolower(), sprintf(), and strptime()) with ones that fully support the Unicode standards related to natural language and date-time processing. It also fixes some long-standing inconsistencies, and introduces some new, useful features. Thanks to 'ICU' (International Components for Unicode) and 'stringi', they are fast, reliable, and portable across different platforms.

Authors:Marek Gagolewski [aut, cre, cph]

stringx_0.2.8.tar.gz
stringx_0.2.8.zip(r-4.5)stringx_0.2.8.zip(r-4.4)stringx_0.2.8.zip(r-4.3)
stringx_0.2.8.tgz(r-4.4-any)stringx_0.2.8.tgz(r-4.3-any)
stringx_0.2.8.tar.gz(r-4.5-noble)stringx_0.2.8.tar.gz(r-4.4-noble)
stringx_0.2.8.tgz(r-4.4-emscripten)stringx_0.2.8.tgz(r-4.3-emscripten)
stringx.pdf |stringx.html
stringx/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/gagolews/stringx/issues

On CRAN:

icuicu4cnatural-language-processingnlpregexregexpstring-manipulationstringitexttext-processingunicode

4.92 score 28 stars 1 scripts 321 downloads 97 exports 1 dependencies

Last updated 4 months agofrom:40ae49ef86. Checks:OK: 3 NOTE: 4. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 09 2024
R-4.5-winNOTENov 09 2024
R-4.5-linuxNOTENov 09 2024
R-4.4-winNOTENov 09 2024
R-4.4-macNOTENov 09 2024
R-4.3-winOKNov 09 2024
R-4.3-macOKNov 09 2024

Exports:%x!=%%x*%%x+%%x<%%x<=%%x==%%x>%%x>=%as.Date.POSIXxtas.POSIXlt.POSIXxtas.POSIXxtas.POSIXxt.characteras.POSIXxt.Dateas.POSIXxt.defaultas.POSIXxt.POSIXtc.POSIXxtcasefoldchartrchartr2digits_decdigits_hexendsWithformat.POSIXxtgregexecgregexec2gregexprgregexpr2gregextr2gregextr2<-grepgreplgrepl2grepv2grepv2<-gsubgsub2gsubstrgsubstr<-gsubstrlgsubstrl<-is.POSIXxtISOdateISOdatetimeletters_bbLETTERS_BBletters_bfLETTERS_BFletters_calLETTERS_CALletters_frakLETTERS_FRAKletters_greekLETTERS_GREEKncharnzcharOps.POSIXxtpastepaste0printfregexecregexec2regexprregexpr2regextr2regextr2<-rep.POSIXxtseq.POSIXxtsort.charactersprintfstartsWithstrcatstrcollstrftimestrptimestrrepstrsplitstrtransstrtrimstrwrapsubsub2substrsubstr<-substringsubstring<-substrlsubstrl<-Sys.timetolowertouppertrimwsxtfrmxtfrm.characterxtfrm.defaultxtfrm2xtfrm2.characterxtfrm2.default

Dependencies:stringi

Readme and manuals

Help Manual

Help pageTopics
Drop-in Replacements for Base String Functions Powered by Stringi-package stringx-package about_stringx stringx
Character Constantsdigits_dec digits_hex LETTERS_BB letters_bb LETTERS_BF letters_bf LETTERS_CAL letters_cal LETTERS_FRAK letters_frak LETTERS_GREEK letters_greek
Detect Pattern Occurrencesgrep grepl grepl2 grepv2 grepv2<-
Construct Date-time ObjectsISOdate ISOdatetime Sys.time
Get Length or Width of Stringsnchar nzchar
Concatenate Strings%x+% paste paste0 strcat
Locate Pattern Occurrencesgregexec gregexec2 gregexpr gregexpr2 regexec regexec2 regexpr regexpr2
Extract Pattern Occurrencesgregextr2 gregextr2<- regextr2 regextr2<-
Format Stringsprintf sprintf
Detect Pattern Occurrences at Start or End of StringsendsWith startsWith
Compare Strings%x!=% %x<% %x<=% %x==% %x>% %x>=% strcoll
Parse and Format Date-time Objectsas.Date.POSIXxt as.POSIXlt.POSIXxt as.POSIXxt as.POSIXxt.character as.POSIXxt.Date as.POSIXxt.default as.POSIXxt.POSIXt c.POSIXxt format.POSIXxt is.POSIXxt Ops.POSIXxt POSIXxt rep.POSIXxt seq.POSIXxt strftime strptime
Duplicate Strings%x*% strrep
Split Strings into Tokensstrsplit
Transliteration and Other Text Transformscasefold chartr chartr2 strtrans tolower toupper
Shorten Strings to Specified Widthstrtrim
Word-Wrap Textstrwrap
Replace Pattern Occurrencesgsub gsub2 sub sub2
Extract or Replace Substringsgsubstr gsubstr<- gsubstrl gsubstrl<- substr substr<- substring substring<- substrl substrl<-
Trim Leading or Trailing Whitespacestrimws
Sort Stringssort.character xtfrm xtfrm.character xtfrm.default xtfrm2 xtfrm2.character xtfrm2.default