Functions

rpad

Supported By

Syntax

[the] rpad of ( string , length [, padding] )

rpad ( string , length [, padding] )

String and padding yield any strings. Length yields an integer.

Description

The rpad function appends the specified padding to the specified string until the resulting string is longer than the specified length, then returns the leftmost length characters of the resulting string. In other words, the string is padded on the right to be aligned to the left. If no padding is specified, spaces are used.

Note

If length is zero or negative, empty is returned. If length is shorter than the specified string, only the leftmost length characters of the original string are returned.

See Also

lpad, cpad