Skip to content

Commit 26c4fe0

Browse files
committed
fix(string): split separator should not be empty
1 parent 820dca4 commit 26c4fe0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

String.ark

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@
282282
# =end
283283
# @author https://github.com/Natendrtfm
284284
(let split (fun (_string _separator) {
285+
(assert (not (empty? _separator)) "string:split expected a non-empty separator")
286+
285287
(mut _at (find _string _separator))
286288
(let _seplen (len _separator))
287289
(let _strlen (len _string))

0 commit comments

Comments
 (0)