ref: e1a091f7f770a783d3847bff4fd1bb402fd8f22b
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)
}