;; | ---------------------------------------------------------------------------- ;; | ST_RTrim ;; | ---------------------------------------------------------------------------- ;; | Function : To trim the right hand spaces of a string ;; | Arguments : 'Str' - String to trim ;; | Return : None ;; | Updated : May 30, 2009 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun ST_RTrim ( Str / len) (setq len (strlen str) len (if (= len 0 ) 1 len) ) (while (and (/= len 0) (= (substr str len 1) " ")) (setq len (1- len)) ) (if (= len 0) "" (substr str 1 len)) )