This question follows How to remove space before or after argument then compare it with a string
The answer from @StevenB.Segletes use \readlist* macro which remove leading/trailing spaces from an item, can anyone help me understand how it is done. I took a look to listofitems.sty but I can't find where it is defined.
\documentclass{article}
\usepackage{listofitems}
\def\posa(#1){%
\readlist*\myarg{#1}
\if+\myarg[1]Plus\else \if-\myarg[1]Minus\else Retry \fi\fi
}
\begin{document}
\posa(+)
\posa( -)
\posa(?)
\posa( + )
\end{document}
listofitems.tex, which is pointed to bylistofitems.sty. – Steven B. Segletes Feb 16 '18 at 12:26\long\def\loi_removeextremespaces#1{\romannumeral\expandafter\expandafter\expandafter\loi_removelastspaces\expandafter\expandafter\expandafter{\expandafter\expandafter\expandafter\loi_stop\loi_removefirstspaces{#1}}% }– Steven B. Segletes Feb 16 '18 at 12:32