Pad
What It Does
Adds characters to the beginning or end of a string until it reaches the desired length. This is useful for aligning text, creating fixed-width formats, or visual styling.
Inputs
string
The text to pad
String
Yes
length
The target length for the padded string
Number
Yes
character
The character to pad with
String
Yes
position
Where to add padding (start or end)
String
No
Outputs
string
The padded text
String

How to Use It
Drag the Pad node into your graph.
Connect the text you want to pad to the "string" input. For e.g.,
name
.Set the desired "length" for the final string. For e.g.,
10
.Specify the "character" to use for padding (only the first character will be used).
Select the "position" to add padding (start or end).

Tips
If your string is already longer than the specified length, it won't be truncated.
Only the first character of the "character" input will be used for padding.
See Also
Case Convert: For changing text case format.
Normalize: For standardizing text representation.
Use Cases
UI Display: Create fixed-width elements for consistent visual alignment.
Code Formatting: Format code identifiers with consistent spacing.
Data Export: Prepare fixed-width fields for legacy systems or data exchange formats.
Last updated