lpad - luxembourg/muxcode-clm GitHub Wiki
LPAD()
FUNCTION: lpad(<string>, <width>[, <fill>])
This function left-justifies <string> within a <width>-sized field. That is, it positions <string> visually in the left-most part of a <width>-sized field.
The background of this field is specified by a repeating pattern of <fill> characters. The origin of this repeating pattern is at the first position of the field. Another way of saying this is that the repeating pattern starts in first position and repeats to the right. The last <fill> pattern may be truncated.
By default, <fill> is a single, normal-colored space. The color of <string> and <fill> is maintained.
Unlike ljust(), if the visual width of <string> is longer than <width> characters, it is not truncated to fit.
Examples: > say -[lpad(foo,6)]- You say, "-foo -" > say %r0[lpad(foo,6)]7%r01234567 You say, " 0foo 7 01234567" > say =[lpad(bar,5,.)]= You say, "=bar..=" > say lpad(%xh%xrR%xgG%xbB,31,%xy--%xm+) RGB--+--+--+--+--+--+--+--+--+-