Difference between revisions of "PADC()"

From Recital Documentation Wiki
Jump to: navigation, search
Line 12: Line 12:
  
 
==See Also==
 
==See Also==
[[LPAD()]], [[PADL()]], [[PADR()]], [[RPAD()]], [[STR()]], [[STREXTRACT()]], [[STRTRAN()]], [[STRZERO()]], [[STUFF()]], [[SUBSTR()]],  
+
[[CENTER()]], [[LPAD()]], [[PADL()]], [[PADR()]], [[RPAD()]], [[STR()]], [[STREXTRACT()]], [[STRTRAN()]], [[STRZERO()]], [[STUFF()]], [[SUBSTR()]],  
  
  

Revision as of 12:58, 9 June 2009

Class

String Data


Purpose

Function to pad out a string to a specified length


Syntax

PADC(<expC1>,<expN>)


See Also

CENTER(), LPAD(), PADL(), PADR(), RPAD(), STR(), STREXTRACT(), STRTRAN(), STRZERO(), STUFF(), SUBSTR(),


Description

The PADC() function centers a character string <expC1> and pads out the right and left of the string, to a total length of <expN> characters with blanks. PADC() returns the new string. If the string being processed is longer than the specified total length, it is returned unchanged.


Example

? ["] + padc("abc",7) + ["]
"  abc  "


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer