summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tissue/utils.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/tissue/utils.scm b/tissue/utils.scm
index 4f865be..c3b3e3a 100644
--- a/tissue/utils.scm
+++ b/tissue/utils.scm
@@ -20,10 +20,15 @@
#:use-module (rnrs io ports)
#:use-module (srfi srfi-26)
#:use-module (ice-9 popen)
- #:export (call-with-current-directory
+ #:export (string-remove-prefix
+ call-with-current-directory
get-line-dos-or-unix
memoize-thunk))
+(define (string-remove-prefix prefix str)
+ "Remove PREFIX from STR."
+ (substring str (string-length prefix)))
+
(define (call-with-current-directory curdir thunk)
"Call THUNK with current directory set to CURDIR. Restore current
directory after THUNK returns."