1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
public List<string> StringSplitter(string inputString, string seperator)
{
List<string> output = new List<string>();
int offset = 0, i;
while ((i = inputString.IndexOf(seperator,offset)) != -1)
{
output.Add(inputString.Substring(offset, i - offset));
offset = i + seperator.Length;
i = inputString.IndexOf(seperator, offset);
}
output.Add(inputString.Substring(offset, inputString.Length - offset));
return output;
}
|