summaryrefslogtreecommitdiff
path: root/Com/Simatime/String.scm
diff options
context:
space:
mode:
Diffstat (limited to 'Com/Simatime/String.scm')
-rw-r--r--Com/Simatime/String.scm24
1 files changed, 0 insertions, 24 deletions
diff --git a/Com/Simatime/String.scm b/Com/Simatime/String.scm
deleted file mode 100644
index 770b04b..0000000
--- a/Com/Simatime/String.scm
+++ /dev/null
@@ -1,24 +0,0 @@
-(define-module (Com Simatime String)
- #:export (replace to-string str capitalize))
-
-(define (replace s match repl)
- (let ((f (lambda (a b)
- (let ((next-char (if (eq? a match) repl a)))
- (string-concatenate (list b (string next-char)))))))
- (string-fold f "" s)))
-
-(define (to-string x)
- (format #f "~a" x))
-
-(define str
- (case-lambda
- (() "")
- ((x) (to-string x))
- ((x . rest) (string-concatenate (map str (cons x rest))))))
-
-(define (capitalize s)
- (let ((s (to-string s)))
- (if (< (string-length s) 2)
- (string-upcase s)
- (str (string-upcase (substring s 0 1))
- (substring s 1 )))))