mirror of
https://github.com/teo3300/rust-mal.git
synced 2026-01-12 01:05:32 +01:00
Renaming libraries
This commit is contained in:
@ -32,9 +32,7 @@
|
||||
(split-r (cdr l) (str t cc) r))))))
|
||||
(reverse (split-r s "" '()))))
|
||||
|
||||
(def! split (fn* [string delimiter]
|
||||
"Split the string at every occurrence of substring delimiter"
|
||||
"An empty delimiter is splitting every character"
|
||||
(def! split-h (fn* [string delimiter]
|
||||
(if (= (strlen delimiter) 1)
|
||||
(_split-ch string (char delimiter))
|
||||
(do (def! delimiter (boom delimiter))
|
||||
@ -50,6 +48,13 @@
|
||||
(split-r string delimiter "" (str chunk matches curr) chunks)))))))
|
||||
(reverse (split-r (boom string) delimiter "" "" '()))))))
|
||||
|
||||
(def! split (fn* [string delimiter]
|
||||
"Split the string at every occurrence of substring delimiter"
|
||||
"An empty delimiter is splitting every character"
|
||||
(if (= (strlen delimiter) 0)
|
||||
(cdr (split-h string delimiter))
|
||||
(split-h string delimiter))))
|
||||
|
||||
(def! join (fn* [l s]
|
||||
"Join element of list l to a stiring, using s as separator"
|
||||
(def! s (or s ""))
|
||||
|
||||
Reference in New Issue
Block a user