rollNumberStream has String eg PE11115,HI34565,Pe5567,Pe5137,pe4324,EE21258 and I need to count number of people in specified department(Passed in arguments as dept) case insensitive.
If pe is passed it should consider PE11115, Pe5137,pe4324 all of these
What I have tried:
public static int getCount(Stream<string> rollNumberStream, String dept) {
long count_roll=rollNumberStream.filter(x->x.startsWith(dept)).count();
int count=(int)count_roll;
return count;
}// this working fine with case sensitive but i want to ignore cases