aboutsummaryrefslogtreecommitdiffstats
path: root/strings.csc
diff options
context:
space:
mode:
Diffstat (limited to 'strings.csc')
-rw-r--r--strings.csc12
1 files changed, 9 insertions, 3 deletions
diff --git a/strings.csc b/strings.csc
index 0828363..737c91b 100644
--- a/strings.csc
+++ b/strings.csc
@@ -1,12 +1,14 @@
(define-library (csc strings)
(export
find
+ join
not-found-error?
prefix?
str-quote)
(import (scheme base)
- (scheme case-lambda)
- (only (scheme write) write))
+ (only (scheme case-lambda) case-lambda)
+ (only (scheme write) write)
+ (only (csc list) intercalate))
(begin
@@ -37,4 +39,8 @@
(let loop ((i start))
(cond ((>= i end) (raise (make-not-found-error)))
((prefix? match str i) i)
- (else (loop (+ 1 i))))))))))
+ (else (loop (+ 1 i))))))))
+
+
+ (define (join sep . strings)
+ (apply string-append (intercalate sep strings)))))