public static string[] SplitString(string text,char splitChar)
{
ArrayList splitParts = new ArrayList(); // Holds splitted parts
int lastSplitPoint = 0;
int textLength = text.Length;
for(int i=0;i<textLength;i++){
if(text[i] == splitChar){
// Add current currentSplitBuffer value to splitted parts list
splitParts.Add(text.Substring(lastSplitPoint,i - lastSplitPoint));
lastSplitPoint = i + 1;
}
}
// Add last split part to splitted parts list
if(lastSplitPoint <= textLength){
splitParts.Add(text.Substring(lastSplitPoint));
}
string[] retVal = new string[splitParts.Count];
splitParts.CopyTo(retVal,0);
return retVal;
}