Home > Back-end > Higher efficiency than the StringTokenizer?
Higher efficiency than the StringTokenizer?
Time:01-07
String TMP=new String (x); While (true) { String subString=null; Int index=TMP. IndexOf (", "); If (index & lt; 0 { break; } The subString=TMP. The subString (0, index); TMP=TMP. The substring (index + 1); } Saw a lot of people have said above this code efficiency is high, but after I n times test, how is lower than the split n times
CodePudding user response:
Eeee, so what's the title,
CodePudding user response:
Split string I generally use the split, mainly is convenient
CodePudding user response:
StringTokenizer efficiency is higher than the split