;; | ---------------------------------------------------------------------------- ;; | ST_PadLeft ;; | ---------------------------------------------------------------------------- ;; | Function : Pad a String with a character in the left ;; | Argument : 'Str' - String to process ;; | 'PadChar' - Padded character ;; | 'len' - Length of the padded string to create ;; | Return : The padded string ;; | Updated : April 13, 2002 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun ST_PadLeft(Str PadChar len / _len Str1 diff) (setq _len (strlen Str) diff (- len _len) Str1 "" ) (if (>= diff 0) (repeat diff (setq Str1 (strcat Str1 PadChar)) ) ) (setq Str (strcat Str1 Str)) )