I have an idea. I want to loop through every character in string argument of macro. For example:
\def\dowithchar#1{%
% some actions with #1
}
\def\mymacro#1{%
% further pseudocode
for (every character \ch in #1)
\dowithchar{\ch}
}
In result I want to have
\mymacro{ABCDEFGH}
render in pdf string like
(A) (B) (C) (D) (E) (F) (G) (H)
Is it possible in LaTeX? If it's possible, tell me please how to do it.