Print an escape sequence.
(pprint-escape esc bytes) → new-bytes
Function:
(defun pprint-escape (esc bytes) (declare (xargs :guard (and (escapep esc) (byte-listp bytes)))) (escape-case esc :simple (pprint-simple-escape esc.escape bytes) :oct (pprint-oct-escape esc.escape bytes) :hex (b* ((bytes (pprint-astring "\\x" bytes)) (bytes (pprint-hex-digit-achars esc.escape bytes))) bytes) :univ (pprint-univ-char-name esc.escape bytes)))
Theorem:
(defthm byte-listp-of-pprint-escape (b* ((new-bytes (pprint-escape esc bytes))) (byte-listp new-bytes)) :rule-classes :rewrite)