Skip to content

Commit

Permalink
Update SymSpell.cs
Browse files Browse the repository at this point in the history
changed part.Any() (LINGQ) to (part.Length>0) for performance reasons
  • Loading branch information
wolfgarbe authored Feb 10, 2022
1 parent 0060a09 commit 8c1ae6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SymSpell/SymSpell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ public List<SuggestItem> LookupCompound(string input, int editDistanceMax)
topResult = results[0].term;
//v6.7
//retain/preserve upper case
if (part.Any() && Char.IsUpper(part[0]))
if ((part.Length>0) && Char.IsUpper(part[0]))
{
char[] a = topResult.ToCharArray();
a[0] = char.ToUpper(topResult[0]);
Expand Down

0 comments on commit 8c1ae6a

Please sign in to comment.