Summary
Splits input string based on split-character, ignoring
split-character in quoted part of the string.
- Namespace
- GitVersion
- Containing Type
- QuotedStringHelpers
Syntax
public static string[] SplitUnquoted(string input, char splitChar)
Examples
"one two three" -> {"one", "two", "three"} "one \"two three\""
-> {"one", "\"two three\""} "one \"two three" -> {"one",
"\"two three"} // implicit closing quote.
Remarks
If there is opening quotes character without closing quotes, closing
quotes are implicitly assumed at the end of the input string.
Parameters
Name | Type | Description |
---|---|---|
input | string | String we want to split. |
splitChar | char | Character used for splitting. |
Return Value
Type | Description |
---|---|
string[] | Array of split string parts |