Carpet

Carpet

2M Downloads

[Scarpet] Splitting an empty string returns an iterable list

altrisi opened this issue ยท 2 comments

commented
split('') -> []
length(split('')) -> 1

for(split(''),
  print(_);    -> '' (probably, didn't check type, but prints the empty line once)
); 

Is this intended?

Carpet 1.4.21

commented

Seems like thats just how java's String.split() function does it

commented

Oh, that actually makes sense, didn't really check that.

Is it intended in Scarpet though?