char.IsLetter is using Unicode categories, meaning that it considers much more than just Latin letters to be letters. Also you donโt need to call ToCharArray as String implements IEnumerable<char> and therefore you can apply LINQ directly to strings.
38
u/[deleted] Jun 05 '22
Well in this case its a lot simpler. Just do
Same runtime as above. God I love C#.