diff options
Diffstat (limited to 'bs/string.scm')
-rw-r--r-- | bs/string.scm | 8 |
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` |