I have a function, that returns a number of character occurrences at text. But there is a problem: letter case matters. Function:
public static int GetOccurrences(String text, Char character)
{
return text.Count(x => x == character);
}
For "Lorem ipsum dolor sit amet, pro eu erant semper ancillae" it will be 1 "L" and 3 "l", for example. Is it possible to ignore letter case?