Android split not working correctly

后端 未结 2 1064
一向
一向 2020-12-03 07:08

I\'ve been developing an Android app for the past 4 Months now and came across the following regarding the split function:

String [] arr;
SoapPrimitive resul         


        
相关标签:
2条回答
  • 2020-12-03 07:35

    Following code can be used for any pattern splitting.

    String.split(Pattern.quote("any pattern you would like here !"));
    
    0 讨论(0)
  • 2020-12-03 07:42
    arr = result.toString().trim().split("\\|");
    

    the param of String.split accept a regular expression.

    0 讨论(0)
提交回复
热议问题