+ (apply 'concat (nreverse (cons (substring string i) strings))))))
+
+;;;###autoload
+(defun mail-unquote-printable-region (beg end &optional wrapper)
+ "Undo the \"quoted printable\" encoding in buffer from BEG to END.
+If the optional argument WRAPPER is non-nil,
+we expect to find and remove the wrapper characters =?ISO-8859-1?Q?....?=."
+ (interactive "r\nP")
+ (save-match-data
+ (save-excursion
+ (save-restriction
+ (narrow-to-region beg end)
+ (goto-char (point-min))
+ (when (and wrapper
+ (looking-at "\\`=\\?ISO-8859-1\\?Q\\?\\([^?]*\\)\\?"))
+ (delete-region (match-end 1) end)
+ (delete-region (point) (match-beginning 1)))
+ (while (re-search-forward "=\\(..\\|\n\\)" nil t)
+ (goto-char (match-end 0))
+ (replace-match
+ (if (= (char-after (match-beginning 1)) ?\n)
+ ""
+ (make-string 1
+ (+ (* 16 (mail-unquote-printable-hexdigit
+ (char-after (match-beginning 1))))
+ (mail-unquote-printable-hexdigit
+ (char-after (1+ (match-beginning 1)))))))
+ t t))))))