Skip to content

Commit c198e3b

Browse files
committed
Revert removing unused method: used by NET 4.5
1 parent 909771c commit c198e3b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Exceptionless/Extensions/StringExtensions.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,17 @@ public static bool IsPatternMatch(this string value, string pattern, bool ignore
6060
return String.Equals(value, pattern, comparison);
6161
}
6262

63+
public static string[] SplitAndTrim(this string input, params char[] separator) {
64+
if (String.IsNullOrEmpty(input))
65+
return new string[0];
66+
67+
var result = input.Split(separator, StringSplitOptions.RemoveEmptyEntries);
68+
for (int i = 0; i < result.Length; i++)
69+
result[i] = result[i].Trim();
70+
71+
return result;
72+
}
73+
6374
public static bool ToBoolean(this string input, bool @default = false) {
6475
if (String.IsNullOrEmpty(input))
6576
return @default;

0 commit comments

Comments
 (0)