PadLeft

 

 

 

PadLeft

 

Description

Adds either spaces or a character to the left of a string to reach the specified length.

 

Arguments

1.PadLeft - Name of the Macro.

2.Pad String - The string that will be padded.

3.Length - Length of the resulting string.  Length must be >=0.  Negative numbers are not permitted.

4.Padding Character - The character that will be used to pad the string.  If no character is specified a space will be used.

 

Examples

<PadLeft|200.00|10>

Returns "    200.00".

 

<PadLeft|OnTheRight|25|->

Returns "---------------OnTheRight".

 

Notes

If the length of the supplied string is longer than the desired length, the supplied string will be returned unmodified.  If the string is too long, use the Substring or Trim macro.  The following characters cannot be used to pad: left angle <, right angle >, percent %, pipe |, double quote ".

 


Copyright © 2024 pasUNITY, Inc.

 

Send comments on this topic.