std-lpad, std-rpad | ![]() |
They justify a string to the left or right, so that the resulting string is exactly len characters long.
std-lpad adds spaces at the end until the the string has a length of len.
std-rpad adds spaces at the beginning until the the string has a length of len.
It is the same as the IntelliCAD ilisp function LPAD and RPAD
(std-lpad (rtos 1.0) 6) => "1.0 " (std-rpad (rtos 1.0) 6) => " 1.0"
str: a string.
len: a positive integer number.
A string.
None.
(std-require 'STDSTR)
Defined in STDSTR