Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - ch_rpad( <cstring>, <nlength> ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
CH_RPAD( <cString>, <nLength> )


Parameters

<cString>
String to pad.

<nLength>
Desired length of the resulting string.


Returns

A string of length <nLength>.


Description

If <cString> is shorter than <nLength>, the original string is appended 
with spaces to fill out the required length.

If the original string is longer than <nLength>, the string is 
truncated to the required length (that is, only the first <nLength> 
characters are retained).


Example

cName = 'ABC. Corp'
cLongName = CH_RPAD(cName, 30)
? LEN(cName)
9

? LEN(cLongName)
30





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