Code: Select all
\foo c
PS: When internal and external macros share similar names (here, foo), what conventions are recommended? (In TeX, @ for the internal...)
Code: Select all
\documentclass{article}
\usepackage{xparse}
\ExplSyntaxOn
\cs_new:Nn \Foo:n { \tl_if_empty:nTF{#1}{EMPTY}{(#1)} }
\NewDocumentCommand { \foo } { m }
{
\Foo:n{#1}
}
\ExplSyntaxOff
\begin{document}
\foo{c} % (c)
\foo{} % EMPTY
\foo c % (c)
\end{document}