pad end

This block is part of the value group and was last modified in core v14.0.1.

pad end v13.0.1 Updated v14.0.1

Pads the given value with char. on the right to match the given length.

In pins 3
  • value required
    value

    The value to pad

  • length required
    number

    The padding length

  • pad. with
    value

    The value used as padding

Out pins 1
  • value
    value

    Returns the padded value

Appends pad_with (repeated, then truncated) on the RIGHT until the value reaches target_length, counting Unicode code points, not bytes. Returns the value unchanged when it is already at or beyond target_length or when pad_with is empty; pad_with defaults to a single space. Example: "7" target_length=3 pad_with="0" -> "700".

A typical wiring for pad end: the value out pin feeds convert to uppercase.

Studio canvas example for the pad end block: typical wiring for pad end.

Version history

Introduced in v13.0.1.

Last modified in v14.0.1.


Back to value Return to the main group to view all sub-groups Back to utils Return to the group to view all blocks within this group