;;note: these functions are probably obsolete if you are using R2000-> ;;since vl-string functions can accomplish the same thing more efficiently ;;strip all non-printing characters (defun strip_whitespace (str / temp count cur) (setq temp "" count 1); (repeat (strlen str) (if (> (ascii(setq cur(substr str count 1))) 32) (setq temp (strcat temp cur)) );if (setq count (1+ count)) );repeat temp );strip_whitespace ;;trim only leading and trailing non-printing characters (defun trim_whitespace (str / len) ;trim leading (while (< 0 (ascii str) 33) (setq str (substr str 2))) ;trim trailing ;;allow for "all white" string (if (> (strlen str) 0) (while (< (ascii (substr str (setq len (strlen str)))) 33) (setq str (substr str 1 (1- len))) ) ); str );trim_whitespace