mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-15 15:57:52 +08:00
Add ContainsIgnoreCase helper to reduce string alloc, cleanup
This commit is contained in:
@ -59,7 +59,7 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
|
||||
string displayName = Utility.SignatureHighlighter.ParseFullSyntax(type, true);
|
||||
string fullName = RuntimeProvider.Instance.Reflection.GetDeobfuscatedType(type).FullName;
|
||||
|
||||
string filteredName = fullName.ToLower();
|
||||
string filteredName = fullName;
|
||||
|
||||
list.Add(new CachedType
|
||||
{
|
||||
@ -89,7 +89,7 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
|
||||
|
||||
timeOfLastCheck = Time.time;
|
||||
|
||||
value = value?.ToLower() ?? "";
|
||||
value = value ?? "";
|
||||
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
@ -118,7 +118,7 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
|
||||
if (added.Contains(entry.FullNameValue))
|
||||
continue;
|
||||
|
||||
if (entry.FullNameForFilter.Contains(value))
|
||||
if (entry.FullNameForFilter.ContainsIgnoreCase(value))
|
||||
AddToDict(entry);
|
||||
|
||||
added.Add(entry.FullNameValue);
|
||||
|
Reference in New Issue
Block a user