Is there a package that provides a command for testing whether a string is in a list? I saw several answers that define their own commands to perform this or similar tasks, but I prefer a "self-evolving", and well-documented solution for this kind of tasks. More precisely, the command should be something like this
\IfStringInList{string}{list}{DoThisIfTrue}{DoThisIfFalse}
For instance
\IfStringInList{Paul}{George,John,Paul,Ringo}{Beat it}{Roll it}
EDIT: I'm not against defining commands. I expected thas this natural functionality was present in a ready-to-use package, that can be accessed in a very simple way.
{}{}{}...
, for instance, is not.\in@
and\ifin@
are predefined in the latex format.makeatletter
/makeatother
?. I would like a plain simple command.@
but see Heiko's answer which is the same as mine (which I have now deleted) but just packaged for actual use.