;; | ---------------------------------------------------------------------------- ;; | ST_StrZ ;; | ---------------------------------------------------------------------------- ;; | Function : Converts an integer into string with leading 0 ;; | Argument : [i] - the integer ;; | [len] - no of decimal ;; | Return : String with leading zero ;; | Updated : August 17, 1998 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun ST_StrZ (i len / tmp Str _Str ) (setq Str (itoa i) tmp (strlen Str) ) (if (< tmp len) (progn (setq tmp (- len tmp) _Str "" ) (repeat tmp (setq _Str (strcat _Str "0")) ) (setq Str (strcat _Str Str)) )) Str )