Pad

padMicronode

Widens text to a fixed length by repeating a filler character. Folded at compile time: the result is spliced into the surrounding text as characters, so no node reaches the renderer and the number cannot be re-formatted, animated or bound to afterwards. Text already at or beyond the length is unchanged.

Explained in:Value primitives

#Attributes

lengthRequiredImplicit
number
The length to pad up to.Can be written as shorthand: pad:value
with
string
The filler. Absent or empty, it is one space — a string value is trimmed and cannot carry one.
side
Which end the filler goes on: start or end.
Defaultstart

#Allowed content

Body { }Text

#Examples

!pad:6{42}(with: 0)

#Notes

  • !pad:6{42} folds to 42; !pad:6{42}(side: end; with: .) to 42....; !pad:6{42}(with: 0) to 000042.