Difference between revisions of "LPAD()"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 30: | Line 30: | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
+ | [[Category:String Data]] | ||
+ | [[Category:String Data Functions]] |
Revision as of 15:44, 2 June 2009
Class
String Data
Purpose
Function to pad out a character string to a defined length from the left
Syntax
LPAD(<expC1>,<expN>,[<expC2>])
See Also
RPAD(), STR(), STRTRAN(), STRZERO(), STUFF(), SUBSTR()
Description
The LPAD() function right justifies a character string <expC1> and pads out the left of the string, to a total length of <expN> characters, with blank spaces. The optional <expC2> may be used to pad <expC1> with a character string instead of blank spaces. The LPAD() function is useful for creating fixed length character strings by padding out the string with blanks. If the string being processed is longer than the specified total length, the string is truncated.
Example
? lpad("abc",6,"d") dddabc
Products
Recital Database Server, Recital Mirage Server, Recital Terminal Developer