compare two strings ignoring spaces code example
Example: compare two strings ignoring spaces
if(a.replaceAll("\\s+","").equalsIgnoreCase(b.replaceAll("\\s+",""))) {
// this will also take care of spaces like tabs etc.
}
if(a.replaceAll("\\s+","").equalsIgnoreCase(b.replaceAll("\\s+",""))) {
// this will also take care of spaces like tabs etc.
}