cpad - luxembourg/muxcode-clm GitHub Wiki
CPAD()
FUNCTION: cpad(<string>, <width>[, <fill>])
This function centers <string> within 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 center(), if the visual width of <string> is longer than <width> characters, it is not truncated to fit.
Example: > say cpad(a,5,-) You say, "--a--" > say cpad(BAMF,15) You say, " BAMF " > say cpad(%xh%xrR%xgG%xbB,31,%xy--%xm+) --+--+--+--+--RGB+--+--+--+--+-