PadRight

 

 

 

PadRight

 

Description

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

 

Arguments

1.PadRight - 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

<PadRight|200.00|10>

Returns "200.00    ".

 

<PadRight|OnTheLeft|25|->

Returns "OnTheLeft----------------".

 

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.



Created with an evaluation copy of HelpSmith.
To remove this notice, you should purchase the full version of the product.