diff options
Diffstat (limited to 'src/util.scm')
-rw-r--r-- | src/util.scm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/util.scm b/src/util.scm index 41da769..c71c600 100644 --- a/src/util.scm +++ b/src/util.scm | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | (import scheme (chicken base) | 3 | (import scheme (chicken base) |
4 | (chicken condition) | 4 | (chicken condition) |
5 | (only (chicken irregex) irregex-replace/all) | ||
5 | (chicken string)) | 6 | (chicken string)) |
6 | 7 | ||
7 | (define-syntax define-public | 8 | (define-syntax define-public |
@@ -34,6 +35,15 @@ | |||
34 | (apply alist-walk (cdr kv) (cdr keys))))))) | 35 | (apply alist-walk (cdr kv) (cdr keys))))))) |
35 | 36 | ||
36 | (define (string-join ss #!optional (sep " ")) | 37 | (define (string-join ss #!optional (sep " ")) |
37 | (string-intersperse ss sep))) | 38 | (string-intersperse ss sep)) |
39 | |||
40 | (define (flush-lines-left lines) | ||
41 | (irregex-replace/all '(: bol (* space)) | ||
42 | (string-join lines) "")) | ||
43 | |||
44 | (define (join-lines lines) | ||
45 | (apply string-append lines)) | ||
46 | |||
47 | ) | ||
38 | 48 | ||
39 | 49 | ||