rpad(string, width [, character])

Make a string width characters long. If the string is currently less than width characters, make the string width characters long by right padding the string with the space character by default or with the specified padding character. If the string is currently more than width characters wide, truncate the string to width characters by removing characters from the right side of the string.

Examples

str = rpad("test", 8)
str = rpad("testing",4)
str = rpad("testing", 20, "#")