String split not returning empty results

前端 未结 9 1533
走了就别回头了
走了就别回头了 2020-12-02 00:12

I\'m trying to use

\"value1:value2::value3\".split(\":\");

Problem is that I want it to include the blank results.

It returns:

9条回答
  •  天涯浪人
    2020-12-02 00:42

    That should work but give StringTokenizer a go if you're still having issues.

提交回复
热议问题