From 838d0ec583af2690d485b6af126bd66b3cea6611 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Tue, 2 Feb 2021 05:45:24 +1100 Subject: [PATCH] combine condition --- Flow.Launcher.Infrastructure/StringMatcher.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Flow.Launcher.Infrastructure/StringMatcher.cs b/Flow.Launcher.Infrastructure/StringMatcher.cs index cdb5c4e68..decfdb27c 100644 --- a/Flow.Launcher.Infrastructure/StringMatcher.cs +++ b/Flow.Launcher.Infrastructure/StringMatcher.cs @@ -217,10 +217,8 @@ namespace Flow.Launcher.Infrastructure { if (char.IsUpper(stringToCompare[compareStringIndex]) || char.IsNumber(stringToCompare[compareStringIndex]) || - char.IsDigit(stringToCompare[compareStringIndex])) - return true; - - if (compareStringIndex == 0) + char.IsDigit(stringToCompare[compareStringIndex]) || + compareStringIndex == 0) //0 index means char is the start of the compare string, which is an acronym return true; if (compareStringIndex != 0 && char.IsWhiteSpace(stringToCompare[compareStringIndex - 1]))