klyn.String.lpad
method
public lpad(width as Int, fill as Char = ' ') as String:
Description

Left pads this string to the target width.

Parameters
  • width Target width.
  • fill Fill character (default: space).
Returns

A new padded string, or this string when it is already wide enough.

Example
assert "42".lpad(5, '0') == "00042"