Generally, I tend to see LaTeX commands as subroutines rather than functions. I was wondering if LaTeX allows the definition of functions for, say, transforming text by replacing substrings.
I suppose that feature is something possible, because some packages let the user to use functions, real functions, to transform text. Even
MakeUppercase does it.
If I wanted to make a function that replaces all "U"s for "V"s, and all "W"s for "VV"s, what would it be the anatomy of that function?