summaryrefslogtreecommitdiff
path: root/bs/string.scm
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-06-01 15:28:37 -0700
committerBen Sima <ben@bsima.me>2020-06-01 15:28:37 -0700
commit6aa4f1890a4e1327b5eabfb19386c94750223cbe (patch)
tree22e247aa1a74190288900c24fa35b7b5d0431e6b /bs/string.scm
parent96245a828aa9c717b847812812546667e090ee3f (diff)
Some fixups
Diffstat (limited to 'bs/string.scm')
-rw-r--r--bs/string.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/bs/string.scm b/bs/string.scm
index 6d6e941..963525c 100644
--- a/bs/string.scm
+++ b/bs/string.scm
@@ -10,8 +10,10 @@
(only (srfi srfi-13)
string-trim string-trim-both string-trim-right
string-prefix? string-suffix? string-upcase string-concatenate
- string-drop string-take string-contains substring/shared string-null? string-fold)
- (only (srfi srfi-14) string->char-set)
+ string-drop string-take string-contains substring/shared string-null? string-fold
+ string-tokenize)
+ (only (srfi srfi-14)
+ string->char-set char-set-complement char-set)
(only (srfi srfi-28) format)
;; TODO: remove or port ice-9 dependency
(only (ice-9 ports) with-output-to-string))
@@ -26,6 +28,8 @@
;; Split `s` at `sep`
(define (split s sep)
+ ;; this is still wrong. it splits on any of the "sep" characters
+ ;; instead of all of them
(string-tokenize s (char-set-complement (apply char-set (string->list sep)))))
;; Replace `match` in `s` with `char`