/// <summary> Sorts the database based on matchness against current filter. </summary> private void Sort() { FuzzyComparable.SortBySearchStringMatchness(ref filter, ref database); #if DEV_MODE && DEBUG_SORT Debug.Log(database.Length + " items Sorted by filter \"" + filter + "\" with BestMatch=" + BestMatch); #endif }
public SearchableList(string[] content) { Items = content; #if DEV_MODE || PROFILE_POWER_INSPECTOR Profiler.BeginSample("SearchableList.Setup"); #endif filter = FuzzyComparable.Empty; int count = content.Length; database = new FuzzyComparable[count]; for (int n = count - 1; n >= 0; n--) { database[n] = new FuzzyComparable(content[n]); } #if DEV_MODE || PROFILE_POWER_INSPECTOR Profiler.EndSample(); #endif }