From 8c1ae6a4ad70d7c20ee6f98acc166ab6654354ee Mon Sep 17 00:00:00 2001 From: Wolf Garbe Date: Thu, 10 Feb 2022 13:11:51 +0100 Subject: [PATCH] Update SymSpell.cs changed part.Any() (LINGQ) to (part.Length>0) for performance reasons --- SymSpell/SymSpell.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SymSpell/SymSpell.cs b/SymSpell/SymSpell.cs index c640ea1..78a5b97 100644 --- a/SymSpell/SymSpell.cs +++ b/SymSpell/SymSpell.cs @@ -1124,7 +1124,7 @@ public List 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]);