mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
Change error handling in split to use doAssert so it is not compiled out when running tests
This commit is contained in:
@@ -808,7 +808,7 @@ proc split*(s: string, sep: string, maxsplit: int = -1): seq[string] {.noSideEff
|
||||
##
|
||||
## Substrings are separated by the string `sep`. This is a wrapper around the
|
||||
## `split iterator <#split.i,string,string>`_.
|
||||
assert(sep.len > 0)
|
||||
doAssert(sep.len > 0)
|
||||
|
||||
accumulateResult(split(s, sep, maxsplit))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user