diff options
-rw-r--r-- | tissue/utils.scm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tissue/utils.scm b/tissue/utils.scm index 7fac814..b90e708 100644 --- a/tissue/utils.scm +++ b/tissue/utils.scm @@ -23,6 +23,7 @@ #:use-module (ice-9 filesystem) #:use-module (ice-9 popen) #:export (string-remove-prefix + string-remove-suffix human-date-string call-with-current-directory call-with-temporary-directory @@ -34,6 +35,11 @@ "Remove PREFIX from STR." (substring str (string-length prefix))) +(define (string-remove-suffix suffix str) + "Remove SUFFIX from STR." + (substring str 0 (- (string-length str) + (string-length suffix)))) + (define (human-date-string date) "Return a human readable rendering of DATE." (let ((elapsed-time |