|
|
|
|
@ -113,6 +113,10 @@ namespace ICSharpCode.ILSpy
@@ -113,6 +113,10 @@ namespace ICSharpCode.ILSpy
|
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case '~': |
|
|
|
|
if (term.Length > 1 && !IsNoncontiguousMatch(text.ToLower(), term.Substring(1).ToLower())) |
|
|
|
|
return false; |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
if (text.IndexOf(term, StringComparison.OrdinalIgnoreCase) < 0) |
|
|
|
|
return false; |
|
|
|
|
@ -122,6 +126,33 @@ namespace ICSharpCode.ILSpy
@@ -122,6 +126,33 @@ namespace ICSharpCode.ILSpy
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool IsNoncontiguousMatch(string text, string searchTerm) |
|
|
|
|
{ |
|
|
|
|
if (string.IsNullOrEmpty(text) || string.IsNullOrEmpty(searchTerm)) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
var textLength = text.Length; |
|
|
|
|
if (searchTerm.Length > textLength) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
var i = 0; |
|
|
|
|
for (int searchIndex = 0; searchIndex < searchTerm.Length;) { |
|
|
|
|
while (i != textLength) { |
|
|
|
|
if (text[i] == searchTerm[searchIndex]) { |
|
|
|
|
// Check if all characters in searchTerm have been matched
|
|
|
|
|
if (searchTerm.Length == ++searchIndex) |
|
|
|
|
return true; |
|
|
|
|
i++; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
i++; |
|
|
|
|
} |
|
|
|
|
if (i == textLength) |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
string GetLanguageSpecificName(Language language, IMemberDefinition member, bool fullName = false) |
|
|
|
|
{ |
|
|
|
|
switch (member) { |
|
|
|
|
|