String.split() should return 0 items if input is empty

Ulf Zibis Ulf.Zibis at gmx.de
Sun Jun 13 12:39:14 UTC 2010


Correction: 0 items (=new String[0])
Actually it returns new String[1] with one zero-length String.

-Ulf


Am 13.06.2010 14:32, schrieb Ulf Zibis:
> Shouldn't String.split("x") return 0 items (=null) if input is empty 
> (=.length()==0),
> as there is neither a matching pattern "x", nor some trailing chars 
> and trailing empty strings should be discarded?
>
> Thanks,
>
> -Ulf
>
>
>




More information about the core-libs-dev mailing list