Remove whitespace characters from the front and end of a string.
(trim x) removes whitespace characters from the
front and end of the string
Function:
(defun trim (x) (declare (xargs :guard (stringp x))) (let* ((bag (list #\Space #\Tab #\Newline #\Page (code-char 13) (code-char 11)))) (trim-bag x bag)))
Theorem:
(defthm stringp-of-trim (stringp (trim x)) :rule-classes :type-prescription)