Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>padleft()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 PADLEFT()
 Pads a string on the left to a particular length
------------------------------------------------------------------------------
 Syntax

     PADLEFT(<cString>,<nLength>,[<cCharacter|
        <nCharacter>]) --> cString

 Arguments

     <cString>  Designates the string that is processed.

     <nLength>  Designates the new length for <cString>.

     <cCharacter|nCharacter>  Designates the character with which the
     beginning of the <cString> string is filled.  The default value is a
     space, CHR(32).

 Returns

     The processed <cString> is returned.

 Description

     PADLEFT() allows you to pad the beginning of character strings with
     characters, in accordance with a length specification.  Spaces or any
     other characters you choose can be used.

 Notes

     .  The function works like the CA-Clipper RIGHT() function when
        <nLength> is shorter than the length of <cString>.  If <nLength> is
        negative, PADLEFT() returns a null string.

     .  When the <cCharacter|nCharacter> parameter is not specified,
        spaces are automatically used for padding.

 Examples

     .  The function works like RIGHT():

        ? PADLEFT("123456", 4)              // "3456"

     .  Pad the left with spaces:

        ? PADLEFT("123456", 8)              // "  123456"

     .  Pad the left with the "." character:

        ? PADLEFT("123456", 8, ".")         // "..123456"


See Also: PADRIGHT()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson