Difference between revisions of "PADC()"
From Lianjapedia
m (Text replace - "Recital" to "Lianja") |
Helen.george (Talk | contribs) |
||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to pad out a string to a specified length | Function to pad out a string to a specified length | ||
− | |||
==Syntax== | ==Syntax== | ||
PADC(<expC1>, <expN> [, <expC2>]) | PADC(<expC1>, <expN> [, <expC2>]) | ||
− | |||
==See Also== | ==See Also== | ||
[[CENTER()]], [[LPAD()]], [[PADL()]], [[PADR()]], [[RPAD()]], [[SET STRESCAPE]], [[STR()]], [[STREXTRACT()]], [[STRTRAN()]], [[STRZERO()]], [[STUFF()]], [[SUBSTR()]], | [[CENTER()]], [[LPAD()]], [[PADL()]], [[PADR()]], [[RPAD()]], [[SET STRESCAPE]], [[STR()]], [[STREXTRACT()]], [[STRTRAN()]], [[STRZERO()]], [[STUFF()]], [[SUBSTR()]], | ||
− | |||
==Description== | ==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. The optional <expC2> may be used to pad <expC1> with a character string instead of blank spaces. PADC() returns the new string. If the string being processed is longer than the specified total length, it is returned unchanged. | 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. The optional <expC2> may be used to pad <expC1> with a character string instead of blank spaces. PADC() returns the new string. If the string being processed is longer than the specified total length, it is returned unchanged. | ||
− | |||
==Example== | ==Example== | ||
Line 20: | Line 16: | ||
" abc " | " abc " | ||
</code> | </code> | ||
− | |||
==Products== | ==Products== |
Revision as of 13:06, 11 December 2012
Purpose
Function to pad out a string to a specified length
Syntax
PADC(<expC1>, <expN> [, <expC2>])
See Also
CENTER(), LPAD(), PADL(), PADR(), RPAD(), SET STRESCAPE, 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. The optional <expC2> may be used to pad <expC1> with a character string instead of blank spaces. 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
Lianja, Lianja Server