Here is a MWE:
\documentclass{article}
\begin{document}
\ExplSyntaxOn
\tl_new:N \l_tmpc_tl
\tl_set:Nn \l_tmpa_tl {*~123}
\tl_set:Nx \l_tmpb_tl
{
\tl_trim_spaces:n { \tl_tail:N \l_tmpa_tl }
}
\tl_set:Nn \l_tmpc_tl { \tl_tail:N \l_tmpa_tl }
test \tl_use:N \l_tmpb_tl \par
test \tl_use:N \l_tmpc_tl
\ExplSyntaxOff
\end{document}
I found that \tl_trim_spaces:n didn't work. What I want is test123. And if I didn't use the \tl_tail:N then it worked.
I don't know how to solve this problem. Thanks for any help!


\tl_trim_spaces:e. (didn't write explanation.) – user202729 May 05 '22 at 05:51\tl_trim_spaces:edoesn't exist. – Zeping Lee May 05 '22 at 10:59\cs_generate_variant:Nn \tl_trim_spaces:n { e }now it does exist :) (and it's expandable, contrary to\tl_trim_spaces:N– Phelype Oleinik May 05 '22 at 11:06