(vl-print-url x &key (ps 'ps)) prints text with automatic URL encoding.
(vl-print-url x &key (ps 'ps)) → ps
This function simply prints the URL-encoding of
Function:
(defun vl-print-url-fn (x ps) (declare (xargs :stobjs (ps))) (declare (xargs :guard (vl-printable-p x))) (let ((__function__ 'vl-print-url)) (declare (ignorable __function__)) (let* ((rchars (vl-ps->rchars)) (x (vl-printable-fix x))) (cond ((stringp x) (vl-ps-update-rchars (str::url-encode-string-aux x 0 (length x) rchars))) ((and (atom x) x) (vl-ps-update-rchars (str::url-encode-chars-aux (explode-atom x 10) rchars))) (t (vl-ps-update-rchars (str::url-encode-chars-aux x rchars)))))))
Theorem:
(defthm vl-print-url-fn-of-vl-printable-fix-x (equal (vl-print-url-fn (vl-printable-fix x) ps) (vl-print-url-fn x ps)))
Theorem:
(defthm vl-print-url-fn-vl-printable-equiv-congruence-on-x (implies (vl-printable-equiv x x-equiv) (equal (vl-print-url-fn x ps) (vl-print-url-fn x-equiv ps))) :rule-classes :congruence)