sometimes filter is null and I don't know why
This commit is contained in:
parent
3a2711c70a
commit
ae57bf7276
@ -798,6 +798,9 @@ namespace UniversalEditor
|
||||
}
|
||||
public static bool Match(this string input, string filter)
|
||||
{
|
||||
if (filter == null)
|
||||
return false;
|
||||
|
||||
string wildcardToRegex = "^" + System.Text.RegularExpressions.Regex.Escape(filter).Replace("\\*", ".*").Replace("\\?", ".") + "$";
|
||||
return new System.Text.RegularExpressions.Regex(wildcardToRegex).IsMatch(input);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user