;; where finds and replaces
;; are equal length lists
(define regex:replace-everything
(lambda (str finds replaces)
(if (<> (length finds) (length replaces))
(impc:compiler:print-compiler-error "regex:replace-everything expects an equal number of finds and replaces"))
(for-each (lambda (find replace)
(if (not (string=? find replace))
(let ((s (regex:replace-all str find replace)))
(set! str s))))
finds replaces)
str))