I am trying to check if my hashmap key set contains the string 'buffSB.toString()'. But I wanted to compare ignoring case (upper or lower).
static StringBuilder buffSB = new StringBuilder();
buffSB.append(alphabet);
Map<String, String> pref = new Datamatch().main(); // Getting the Hashmap from other class
if(pref.containsKey(buffSB.toString())) //This is where I need to ignore case while searching string in the map key set
{
String val = pref.get(buffSB.toString());
}
Any help will be greatly appreciated!!!