Add start to split
This commit is contained in:
parent
ba3aac1b13
commit
e027ea9139
1 changed files with 13 additions and 6 deletions
|
|
@ -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]())
|
||||
|
|
|
|||
Loading…
Reference in a new issue