wasSharp – Diff between revs 30 and 42
?pathlinks?
Rev 30 | Rev 42 | |||
---|---|---|---|---|
Line 116... | Line 116... | |||
116 | /// Splits a path using a separator and an escape character. |
116 | /// Splits a path using a separator and an escape character. |
|
117 | /// </summary> |
117 | /// </summary> |
|
118 | /// <param name="path">the path to split</param> |
118 | /// <param name="path">the path to split</param> |
|
119 | /// <param name="separator">the separator character</param> |
119 | /// <param name="separator">the separator character</param> |
|
120 | /// <param name="escape">the escape character</param> |
120 | /// <param name="escape">the escape character</param> |
|
- | 121 | /// <param name="includeRootSeparator">true if the initial separator should be included</param> |
||
121 | /// <returns>path parts</returns> |
122 | /// <returns>path parts</returns> |
|
122 | public static IEnumerable<string> PathSplit(this string path, char separator, char? escape = null, bool includeRootSeparator = true) |
123 | public static IEnumerable<string> PathSplit(this string path, char separator, char? escape = null, bool includeRootSeparator = true) |
|
123 | { |
124 | { |
|
124 | var s = new Stack<char>(); |
125 | var s = new Stack<char>(); |
|
125 | var p = new StringBuilder(); |
126 | var p = new StringBuilder(); |