PadR function

Official Content
This documentation is valid for:

Allows to build a character expression from another one, adding N times, a specified character or blanks to its right side. Notice all trailing spaces from the original string will be removed before applying the function. The implementation of the function is similar to the following:

PadR(string text, int size, string fill)
  return Left(RTrim(text) + Replicate(fill, size), size);

 

Syntax

PadR(Str, Len [,FillChar])

Type returned
Character

Where:

Str 
   Is the character expression from which you want to add right blanks or the FillChar if indicated

Len 
   Is the numeric expression that indicates the length of the returned string.

FillChar 
   Is the caracter that is added to the right side of ‘Str’. It is an optional parameter, if it is not specified then blanks will be added.

Description

Returns a character string, aligned to the right, which is the result of concat the specified ‘FillChar’ , ‘len’ times to the right side of the ‘Str’  specified to the function.

Examples

PadR(“My string”, 14) = “My string     ”
PadR(“My string”, 14, ‘*’) = “My string*****”

Scope

Objects   Procedure object, Transaction object, Web Panel object

See also

PadRight Method
PadLeft Method
PadL function
Trim function
LTrim function
RTrim Function




Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.