search view fixed

This commit is contained in:
Paul Schneider 2022-10-17 19:17:04 +01:00
commit 95600facf4
10 changed files with 45 additions and 67 deletions

View file

@ -6,27 +6,9 @@ namespace isnd.Helpers
{
foreach (var part in id.Split('-'))
{
if (part.Equals(q, System.StringComparison.OrdinalIgnoreCase)) return true;
if (part.Equals(q, System.StringComparison.InvariantCultureIgnoreCase)) return true;
}
return false;
}
internal static bool CamelCaseMatch(string id, string query)
{
// Assert.False (q==null);
if (string.IsNullOrEmpty(query)) return true;
while (id.Length > 0)
{
int i = 0;
while (id.Length > i && char.IsLower(id[i])) i++;
if (i == 0) break;
id = id.Substring(i);
if (id.Equals(query, System.StringComparison.OrdinalIgnoreCase)) return true;
}
return false;
}
}
}