2 implementations of regex_split:
#1
/digego/extempore/tree/v0.8.9/libs/core/adt.xtm ·
#2
/digego/extempore/tree/v0.8.9/libs/core/adt.xtm
(bind-func regex_split
(lambda (regex str)
(let ((a:i8* (salloc 2048))
(b:i8* (salloc 2048)))
(sprintf a "")
(sprintf b "")
(rsplit regex (cstring str) a b)
(append (list (if (> (strlen a) 0)
(String a) (String str)))
(if (> (strlen b) 0)
(regex_split regex (String b))
null)))))