
The function block STR_PAD extends a string using another string to a specific length.
The input defines the string that is manipulated.
The input defines the length of the string at the output. If the length is shorter than or equal to the length of the string at the input STR, no extension is performed.
Defines the string with which it is extended. If the required number of characters to be added cannot be evenly divided by the length of the input, the string is truncated.
The input defines the direction in which the characters are inserted. If no value is defined or another one is present, the type is set to 0.
| Type | Meaning |
|---|---|
| 0 | It is inserted on the right side. |
| 1 | It is inserted on the left side. |
| 2 | It is inserted on both sides. |
Outputs the extended string.