For string matching, you'd expect in(x, y) to tell you if x is a substring of y, that is, if "x in y". Analogously, you'd expect contains(x, y) to tell you if y is a substring of x.

calls its function str_detect, which offers no clue as to the order of the arguments.

Bonus: The gregexpr function does it the other way.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.