Answers for "compare two strings ignoring spaces"

0

compare two strings ignoring spaces

if(a.replaceAll("\\s+","").equalsIgnoreCase(b.replaceAll("\\s+",""))) {
   // this will also take care of spaces like tabs etc.
}
Posted by: Guest on March-22-2021

Code answers related to "compare two strings ignoring spaces"

Browse Popular Code Answers by Language