mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 11:17:53 +01:00
[PT Run] String with accented characters search (#8667)
This commit is contained in:
@@ -96,7 +96,19 @@ namespace Wox.Infrastructure
|
||||
spaceIndices.Add(compareStringIndex);
|
||||
}
|
||||
|
||||
if (fullStringToCompareWithoutCase[compareStringIndex] != currentQuerySubstring[currentQuerySubstringCharacterIndex])
|
||||
bool compareResult;
|
||||
if (opt.IgnoreCase)
|
||||
{
|
||||
var fullStringToCompare = fullStringToCompareWithoutCase[compareStringIndex].ToString();
|
||||
var querySubstring = currentQuerySubstring[currentQuerySubstringCharacterIndex].ToString();
|
||||
compareResult = string.Compare(fullStringToCompare, querySubstring, CultureInfo.CurrentCulture, CompareOptions.IgnoreCase | CompareOptions.IgnoreNonSpace) != 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
compareResult = fullStringToCompareWithoutCase[compareStringIndex] != currentQuerySubstring[currentQuerySubstringCharacterIndex];
|
||||
}
|
||||
|
||||
if (compareResult)
|
||||
{
|
||||
matchFoundInPreviousLoop = false;
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user