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

Coerce inputs to startsWith and endsWith #152

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mikmart
Copy link

@mikmart mikmart commented Jan 20, 2024

Inputs to functions for performing character operations, like substr() and grep(), are typically coerced to character values. However, startsWith() and endsWith() throw errors for non-character inputs, instead. This is particularly notable with factors, for example startsWith(factor("foo"), "f") is currently an error. This patch adds coercion to these two functions, consistent with other functions.

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