search view fixed
This commit is contained in:
parent
58f77a06ea
commit
95600facf4
10 changed files with 45 additions and 67 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue