;; | ---------------------------------------------------------------------------- ;; | ST_RLimit ;; | ---------------------------------------------------------------------------- ;; | Function : Limits the length of a string truncating characters from the ;; | right side if necessary. ;; | Arguments: 'str' - String to check ;; | 'Limit' - Limit length to set ;; | Return : The trimmed string, if its length exceeds the 'limit' ;; | Updated : January 21, 2004 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun ST_RLimit ( str Limit / slen ) (setq len (strlen str)) (if (> len Limit) (setq str (substr str 1 Limit)) ) str )