[Tex/LaTex] Check if a string contains a given character

charactersconditionals

I want to implement an if-then-else depending on whether the argument contains a special character or not. Should I be looking here: http://www.tug.org/TUGboat/Articles/tb28-1/tb88glister.pdf, or does anyone know a simpler way?

Best Answer

\documentclass{article}
\usepackage{xstring}

\begin{document}
    

\IfSubStr{Rotterdam}{otter}{ true }{ false }


\end{document}