diff options
-rw-r--r-- | tissue/utils.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tissue/utils.scm b/tissue/utils.scm index b90e708..26372da 100644 --- a/tissue/utils.scm +++ b/tissue/utils.scm @@ -22,7 +22,8 @@ #:use-module (srfi srfi-26) #:use-module (ice-9 filesystem) #:use-module (ice-9 popen) - #:export (string-remove-prefix + #:export (string-blank? + string-remove-prefix string-remove-suffix human-date-string call-with-current-directory @@ -31,6 +32,10 @@ get-line-dos-or-unix memoize-thunk)) +(define (string-blank? str) + "Return #t if STR contains only whitespace. Else, return #f." + (string-every char-set:whitespace str)) + (define (string-remove-prefix prefix str) "Remove PREFIX from STR." (substring str (string-length prefix))) |