ref: ba22b4a713f78a66d8e6dd4abad3ce06db3c24c3
dir: /test/strsplit.myr/
use std
const main = {
var i
var sp
sp = std.strsplit("a,b,c,d", ",")
for i = 0; i < sp.len; i++
std.put("\"%s\"\n", sp[i])
;;
std.slfree(sp)
sp = std.strsplit("a,,b,c,,d", ",")
for i = 0; i < sp.len; i++
std.put("\"%s\"\n", sp[i])
;;
std.slfree(sp)
sp = std.strsplit("a--b---b--c---c-d--d", "---")
for i = 0; i < sp.len; i++
std.put("\"%s\"\n", sp[i])
;;
std.slfree(sp)
}