(bind-func string_list_from_string
"turn a c string into a list of String*, splitting on split_on"
(lambda (str split_on)
(let ((split_on_cstr (cstring split_on))
(tokenptr (strtok (cstring str) split_on_cstr))
(strlist (list))
(cnt 0))
(while (not (null? tokenptr))
;; (if (= (% cnt 10000) 0)
;; (printf "cnt: %lld tokenptr: %p\n" cnt tokenptr))
(set! cnt (+ cnt 1))
(set! strlist (cons (String tokenptr) strlist))
(set! tokenptr (strtok null split_on_cstr)))
(println "processed" cnt "tokens")
(reverse strlist))))