This is my question.
I'm trying to use the coolstr package. Like this.
Code: Select all
\documentclass[10pt]{article}
\usepackage{coolstr}
\newcommand{\simv}[2]{
\ifstrchareq{#1}{#2}{A}{10}{
\ifstrchareq{#1}{#2}{B}{11}{
\ifstrchareq{#1}{#2}{C}{12}{
\substr{#1}{#2}{1}}}}}
\begin{document}
\simv{C2A3B}{1}
\simv{C2A3B}{2}
\simv{C2A3B}{3}
\simv{C2A3B}{4}
\simv{C2A3B}{5}
\end{document}
What am I doing wrong?
Thank!
Best regards!
kabenyuk