Skip to content

Latest commit

 

History

History
52 lines (36 loc) · 1.47 KB

File metadata and controls

52 lines (36 loc) · 1.47 KB

Pad Text

Pad Text

Overview

Pads text on the left or right side with a specified string to reach a target length. Use this command to align or format strings to a fixed width, for example when preparing fixed-length fields for file output.

Parameters

1. padDirection (RADIO)

  • Label: Pad Direction
  • Description: Specifies whether padding is added to the left or right side of the original text.
  • Required: Yes
  • Default: LEFT
  • Constraints: None
  • Options:
    • LEFT (label "Left"): Padding characters are prepended to the start of the text.
    • RIGHT (label "Right"): Padding characters are appended to the end of the text.

2. sourceText (TEXT)

  • Label: Original text
  • Description: The input string to be padded.
  • Required: Yes
  • Default: None
  • Constraints: None

3. padString (TEXT)

  • Label: Text to pad
  • Description: The string used as padding material, repeated as needed to reach the target length.
  • Required: Yes
  • Default: None
  • Constraints: None

4. finalLength (NUMBER)

  • Label: Final length
  • Description: The desired total length of the resulting padded string.
  • Required: Yes
  • Default: None
  • Constraints: None

Output

Returns a STRING containing the padded text at the specified final length.

Exceptions

Throws BotCommandException on invalid input or internal failure.