Add start to split

This commit is contained in:
Flaviu Tamas 2015-01-24 14:58:09 -05:00
commit e027ea9139

View file

@ -43,3 +43,8 @@ suite "string splitting":
check("a.b" .split(re"\.") .join(",") == "a,b")
check("" .split(re"") .len == 0)
check(":" .split(re"") .len == 1)
test "start position":
check("abc".split(re"", start = 1) == @["b", "c"])
check("abc".split(re"", start = 2) == @["c"])
check("abc".split(re"", start = 3) == newSeq[string]())