Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass{article}
- \usepackage{xstring}
- \newcommand{\Client}[1]{\renewcommand{\Client}{#1}}
- \makeatletter
- \newcommand\foo[1]{%
- \ifnum\pdfstrcmp{#1}{Adam}=0 %
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- {Adam}
- {Eve}%
- }
- \makeatother
- \begin{document}
- \Client{Adam}
- % Attempt using xstring
- My client should be Adam: \IfSubStr{Adam}{\Client}{Adam}{Eve}
- % Attempt using \pdfstrcmp
- My client should be Adam: \foo{\Client}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement