Removing filter on string split method for consistency

This commit is contained in:
Chris Cameron
2017-08-09 15:48:05 -04:00
parent 2bbb7aa2b7
commit 300ce05153
2 changed files with 6 additions and 2 deletions

View File

@@ -206,10 +206,11 @@ namespace ICD.Common.Utils.Extensions
return delimitersArray.Length == 0
? new[] {extends}
: extends.Split(delimitersArray.First())
.SelectMany(s => s.Split(delimitersArray.Skip(1)))
.Where(s => !string.IsNullOrEmpty(s));
.SelectMany(s => s.Split(delimitersArray.Skip(1)));
}
/// <summary>
/// Removes whitespace from the string.
/// </summary>

View File

@@ -158,6 +158,9 @@ namespace ICD.Common.Utils
foreach (string line in progInfo.Split(new[] {"\n\r", "\r\n", "\n", "\r"}))
{
if (string.IsNullOrEmpty(line))
continue;
string[] pair = line.Split(':', 2).ToArray();
if (pair.Length < 2)