this is very helpfull for using a string array instead of string manipulation.
This is the best & fastest splitting method
Code:
public static String[] split(String p_text, String p_seperator)
{
Vector vecStrings = new Vector();
int index;
int prevIdx = 0;
while ((index = p_text.indexOf(p_seperator, prevIdx)) > -1)
{
vecStrings.addElement(p_text.substring(prevIdx, index));
prevIdx = index + 1;
}
vecStrings.addElement(p_text.substring(prevIdx));
String[] result = new String[vecStrings.size()];
vecStrings.copyInto(result);
return result;
}