Skip to content

Commit a099c12

Browse files
committed
Merge pull request #438 from nolta/string2
make split(x) split on all ASCII whitespace chars
2 parents c428171 + 8fc40c4 commit a099c12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

j/string.j

+1-1
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ function split(s::String, delims, include_empty::Bool)
784784
strs
785785
end
786786

787-
split(s::String) = split(s, " ", false)
787+
split(s::String) = split(s, (' ','\t','\n','\v','\f','\r'), false)
788788
split(s::String, x) = split(s, x, true)
789789
split(s::String, x::Char, incl::Bool) = split(s, (x,), incl)
790790

0 commit comments

Comments
 (0)