padLeft

padleft(source: text, pad: text, size: number) 🡒 text, pure function

Prepends pad to the source enough times to reach a length of size.

Example:

show summary "" a1c3 with
  padLeft("1234","0", 7) // returns "0001234"
  padLeft("1234","0_", 7) // returns "0_0_1234"
  padLeft("1234","0__", 7) // returns "0__1234"

The following restrictions apply, otherwise the function fails: