Behavior of str_remove when called with NA_character_ pattern #546
Labels
bug
an unexpected problem or unintended behavior
tidy-dev-day 🤓
Tidyverse Developer Day rstd.io/tidy-dev-day
When called with
NA
as a pattern,str_remove
fails loudly about a type mismatch. When called withNA_character_
as a pattern, it silently returns NA. Is this the expected behavior? If so it doesn't seem to be documented anywhere. Personally, I was expecting thatstr_remove
would have returned the input string unmodified in this scenario (as there is nothing specified to remove), or alternatively failed with an error message.Created on 2024-04-11 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: