In answer to another question, I reported that the square of a string of all ones would yield a number with digits that ascend to the number of original ones and then descend to one again.
For instance (11111)^2=123454321.
The question is, how do I find how many ones there are (how many digits in a number)?
I did a Google search on this question and found many seemingly related questions here but none of the "verbs" in the answers were valid in MathJax on math stack exchange.
UPDATE: I'm told that the word is "control sequence". I would like a control sequence that can do what I do in EXCEL such as
=len(5 * 13 * 17) or =len(1105) where the result is 4.
I am familiar with TEX (all caps in a TTY environment) under the CGOS operating system but I do not need or want this for procedural programming. My needs are for page layout and nothing more.
I need something that will work in both MathJax and TeXShop.

\length{11111}into a TeX document and use my definitions and then process it by TeX, you get 5 in the PDF output. Where is a difference? – wipet Jan 18 '21 at 08:00\newcommand(or\def) actually, but that's about it: it doesn't include anything for counting or checking for empty string or anything needed for nontrivial macros. – ShreevatsaR Jan 18 '21 at 18:44