-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
70 lines (53 loc) · 1.97 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include=FALSE}
knitr::opts_chunk$set(
echo = FALSE,
collapse = TRUE
)
```
# stringrb
<!-- badges: start -->
<!-- badges: end -->
An imperfect replication of [stringr](https://github.com/tidyverse/stringr) in
base R.
Builds upon [hadley/stringb](https://github.com/hadley/stringb) and
[petermeissner/stringb](https://github.com/petermeissner/stringb).
**Any help writing or speeding up functions is appreciated! Just submit a PR.**
## Completed
1. `c.R` - `str_c()`
1. `detect.R` - `str_detect()`, `str_starts()`, `str_ends()`
1. `extract.R` - `str_extract()`, `str_extract_all()`
1. `locate.R` - `str_locate()`, `str_locate_all()`, `invert_match()`
1. `replace.R` - `str_replace()`, `str_replace_all()`, `str_replace_na()`
1. `sub.R` - `str_sub()`
1. `trim.R` - `str_trim()`, `str_squish()`
## In development
1. `match.R` - `str_match()`, `str_match_all()`
1. `case.R` - `str_to_upper()`, `str_to_lower()`, `str_to_title()`, `str_to_sentence()`
## To do
1. `count.R` - `str_count()`
1. `dup.R` - `str_dup()`
1. `length.R` - `str_length()` maybe?
1. `pad.R` - `str_pad()`
1. `remove.R` - `str_remove()`, `str_remove_all()`
1. `sort.R` - `str_order()`, `str_sort()`
1. `split.R` - `str_split()`, `str_split_fixed()`, `str_split_n()`
1. `subset.R` - `str_subset()`, `str_which()`
1. `trunc.R` - `str_trunc()`
1. `word.R` - `word()`
1. `wrap.R` - `str_wrap()`
1. Add `ignore_case` argument to `fixed()`? (see stringr test-detect.R)
## Not planning to do
1. `conv.R` - `str_conv()`
1. `equal.R` - `str_equal()`
1. `glue.R` - `str_glue()`, `str_glue_data()`
1. `interp.R` - `str_interp()`
1. `unique.R` - `str_unique()` maybe?
1. `view.R` - `str_view()`
## Differences compared with stringr
- Generally slower, though this varies across each function
- Using `str_sub()` replacement form with functions is more limited
- `str_replace()` and `str_replace_all()` won't work with formulas