Difference between revisions of "PADL()"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Class==
 
String Data
 
 
 
 
==Purpose==
 
==Purpose==
 
Function to pad out a string to a specified length
 
Function to pad out a string to a specified length
Line 8: Line 4:
  
 
==Syntax==
 
==Syntax==
PADL(<expC1>,<expN>,<expC2>)
+
PADL(<expC1>, <expN> [, <expC2>])
  
  
 
==See Also==
 
==See Also==
[[LPAD()]], [[PADR()]], [[RPAD()]], [[STR()]], [[STREXTRACT()]], [[STRTRAN()]], [[STRZERO()]], [[STUFF()]], [[SUBSTR()]],  
+
[[CENTER()]], [[LPAD()]], [[PADC()]], [[PADR()]], [[RPAD()]], [[SET STRESCAPE]], [[STR()]], [[STREXTRACT()]], [[STRTRAN()]], [[STRZERO()]], [[STUFF()]], [[SUBSTR()]],  
  
  
 
==Description==
 
==Description==
 
The PADL() function right justifies a character string <expC1> and pads out the left of the string, to a total length of <expN> characters.  PADL() returns the new string.  If <expC2> is not specified, <expC1> will be padded with blanks, otherwise the string will be padded with the character specified by <expC2>.  If the string being processed is longer than the specified total length, it is truncated.
 
The PADL() function right justifies a character string <expC1> and pads out the left of the string, to a total length of <expN> characters.  PADL() returns the new string.  If <expC2> is not specified, <expC1> will be padded with blanks, otherwise the string will be padded with the character specified by <expC2>.  If the string being processed is longer than the specified total length, it is truncated.
 +
 +
The PADL() function is synonymous with the LPAD() function.
  
  
Line 27: Line 25:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital, Recital Server
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:String Data]]
 +
[[Category:String Data Functions]]

Latest revision as of 15:43, 21 July 2010

Purpose

Function to pad out a string to a specified length


Syntax

PADL(<expC1>, <expN> [, <expC2>])


See Also

CENTER(), LPAD(), PADC(), PADR(), RPAD(), SET STRESCAPE, STR(), STREXTRACT(), STRTRAN(), STRZERO(), STUFF(), SUBSTR(),


Description

The PADL() function right justifies a character string <expC1> and pads out the left of the string, to a total length of <expN> characters. PADL() returns the new string. If <expC2> is not specified, <expC1> will be padded with blanks, otherwise the string will be padded with the character specified by <expC2>. If the string being processed is longer than the specified total length, it is truncated.

The PADL() function is synonymous with the LPAD() function.


Example

? padl("abc",6,"X")
XXXabc


Products

Recital, Recital Server