I'm working on a document command that has a variety of optional arguments for different results. I need to add an option that yields 'true' for an optional argument within a range of numbers, for example 100-200. The command is as follows (MWE):
\documentclass{article}
\usepackage{xparse,xstring,xspace}
\NewDocumentCommand{\Foo}{ o }{%
\IfNoValueTF{#1} {%
\emph{Foo}\xspace}{%
\IfBeginWith{#1}%
{b}{\emph{Foo} Bar\xspace}{%
\IfStrEqCase{#1}{%
{f}{\emph{Foo}\xspace}%
}%
[\emph{Foo}~#1\xspace]%
}%
}%
}
\begin{document}
\Foo
\Foo[b]
\Foo[3]
\end{document}
xstring does not appear to have a range option.
xstring
works with strings, not numbers.b
something should be done, otherwise it should be a number and this number should be examined?