Actions
Feature #4335
closedString#split for empty string is always empty array
Feature #4335:
String#split for empty string is always empty array
Description
Here is ruby's behavior:
' '.split('/')
# => [" "]
''.split('/')
# => []
'/'.split('/')
# => []
Here is Python's behavior:
>>> ' '.split('/')
[' ']
>>> ''.split('/')
['']
>>> '/'.split('/')
['', '']
Is there any chance to let ''.split('/')
return ['']
instead of []
?
Actions