Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding a parameter to make vec_match() and vec_in() case insensitive #1893

Closed
arnaudgallou opened this issue Nov 5, 2023 · 1 comment

Comments

@arnaudgallou
Copy link

It's fairly common to want to match values independently from the case. Although it's easy to lower case the input data, having a parameter to do it would make it even easier and reduce cognitive load.

# tends to be easier to read
vec_match(needles, haystack, ignore_case = TRUE)

# than
vec_match(tolower(needles), tolower(haystack))
@DavisVaughan
Copy link
Member

Thanks, but I think in this case it is better to keep vec_match() and vec_in() as generic as possible, and let other helpers like tolower() take care of normalizing the input if that is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants