Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / lisp-modules-new-obsolete / import / util.lisp
blob043276305e02344e4d46fc65e4576abbf045378f
1 (defpackage org.lispbuilds.nix/util
2 (:use :cl)
3 (:import-from :ppcre)
4 (:export
5 :replace-regexes))
7 (in-package org.lispbuilds.nix/util)
9 (defun replace-regexes (from to str)
10 (assert (= (length from) (length to)))
11 (if (null from)
12 str
13 (replace-regexes
14 (rest from)
15 (rest to)
16 (ppcre:regex-replace-all (first from) str (first to)))))