summary refs log tree commit diff stats
path: root/lib/pure/strutils.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure/strutils.nim')
-rw-r--r--lib/pure/strutils.nim5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim
index 45c2669f9..314c94909 100644
--- a/lib/pure/strutils.nim
+++ b/lib/pure/strutils.nim
@@ -808,10 +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>`_.
-  ##
-  ## If `sep` is an empty string, `ValueError` is raised.
-  if sep.len == 0:
-    raise newException(ValueError, "invalid separator: empty string not allowed")
+  assert(sep.len > 0)
   
   accumulateResult(split(s, sep, maxsplit))