Pad that string with spaces on the right.
This function controls the length and spacing of a string when it is printed. The integer argument represents the number of characters or spaces the string should have. When the number is less than the total number of characters in the string, the string is truncated to allow only the specified number of characters. When the number is greater than the number of characters in the string, additional spaces are added to the end (or right side) of the string.
NOTE Use lpad to handle the same operations on the beginning (or left side) of the string.
Examples
Code | Returns |
---|---|
(rpad "Einstein" 4) | "Eins" |
(rpad "Einstein" 15) | "Einstein " |
(setq a "Einstein") | |
(rpad a 6) | "Einste" |
Tell me about...
(setq symbol1 statement1 [symbol2 statement2] ...)
Programming Overview of LISP (LISt Processing) Language
Bricscad™ is commercialized by Bricsys NV. Bricsys NV and Vondle NV are fully owned subsidiaries of Menhirs NV. © 2001- Menhirs NV - All rights reserved. |