String Pad
This block pads a string until it reaches a target length.
Configuration
- Input String: the string to pad.
- Pad: which end to add the padding to.
- Start (Pad Start): padding is added before the string, for example
42becomes0042. - End (Pad End): padding is added after the string.
- Start (Pad Start): padding is added before the string, for example
- Target Length: pad until the string is this long.
- Pad String: the string used for padding. Defaults to a space.
Connections
- Result: executed after padding. The padded text is available to the following blocks as
result_str.
A pad string longer than one character is repeated and truncated to fit, so abc padded to 8 characters with -= becomes abc-=-=-.
Note
A string that is already at or beyond Target Length is output unchanged, it is never truncated. Use Substring to shorten a string.