Pads a string on the left to a particular length

        <nCharacter>]) --> cString


     <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).


     The processed <cString> is returned.


     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.


     .  The function works like the 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.


     .  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()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.