Case insensitive String split() method

前端 未结 6 1603
北海茫月
北海茫月 2020-12-10 01:48

When I perform

String test=\"23x34 \";
String[] array=test.split(\"x\"); //splitting using simple letter

I got two items in array as 23 and

6条回答
  •  死守一世寂寞
    2020-12-10 02:37

    Java's String class' split method also accepts regex.

    To keep things short, this should help you: http://www.coderanch.com/t/480781/java/java/String-split

提交回复
热议问题