text: public static string[] StringToPath(string s){IList<string> parts = new List<string>();int length = s.Length;if (length == 0){return new string[0];}char[] buffer = new char[length];int upto = 0;bool lastEscape = false;for (int i = 0; i < length; i++){char ch = s[i];if (lastEscape){buffer[upto++] = ch;lastEscape = false;}else if (ch == ESCAPE_CHAR){lastEscape = true;}else if (ch == DELIM_CHAR){parts.Add(new string(buffer, 0, upto));upto = 0;}else{buffer[upto++] = ch;}}parts.Add(new string(buffer, 0, upto));Debug.Assert(!lastEscape);return parts.ToArray();}