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