stringr
stringr copied to clipboard
Unexpected results for `str_starts()` when use pattern containing `"|"`
See the following example:
stringr::str_starts("A1", "T")
#> [1] FALSE
stringr::str_starts("A1", "\\d")
#> [1] FALSE
stringr::str_starts("A1", "T|\\d")
#> [1] TRUE
Created on 2022-07-31 by the reprex package (v2.0.1)
Also found this SO. So perhaps it is a documentation issue?
But I do think it is better to support this behavior because base startsWith()
supports this, and it is more intuitive.
Ah, I am sorry. This might have been solved by #340. So when will there be a new release?
Not sure. Hopefully in the next couple of months.