Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static string[] Test(string s)
- {
- string tt = "";
- List<string> subStr_ = new List<string>();
- bool inQuotes = false;
- for (int i = 0; i < s.Length; i++)
- {
- if (s[i] == '"')
- {
- inQuotes = !inQuotes;
- continue;
- }
- if (s[i] != ';' || (s[i] == ';' && inQuotes)) tt += s[i];
- else
- {
- subStr_.Add(tt);
- tt = "";
- }
- }
- if (tt != "") subStr_.Add(tt);
- return subStr_.ToArray();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement