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.
#Rstats calls its function str_detect, which offers no clue as to the order of the arguments.
The syntax should explicitly indicate the preposition.
For example, this would be more clear:
for x in y; do ...
It's a BASH compound command. Like a for/next loop...
for x in y; do list; done
where "x" is a variable, "y" is a list of words, "list" is a list of commands. Each time through the loop, x gets set to the next word in the "y" list of words.
It's not a function and actually has little to do with what you were talking about. I just threw it out there to jovially add to the confusion.