Why is this returning false all the time?
var a = new String("17-0069,,Alex Libengood,Travel from - Meadors Office - to - 201 Hildebrand Dr, Bonneau SC,Site inspection,,0.55,/mile,0,miles,,1,17-0069><><Alex Libengood><Travel from - Meadors Office - to - 201 Hildebrand Dr, Bonneau SC><Site inspection><0.55><1,Mileage").trim();
var b = new String("17-0069,,Alex Libengood,Travel from - Meadors Office - to - 201 Hildebrand Dr, Bonneau SC,Site Inspection,,0.55,/mile,0,miles,,1,17-0069><><Alex Libengood><Travel from - Meadors Office - to - 201 Hildebrand Dr, Bonneau SC><Site Inspection><0.55><1,Mileage").trim();
if (a === b){
return true;
} else {
return false;
}
It's the same string!
I've seen other questions answered by using the trim() method, but it's not working for me. It's like there are hidden characters somewhere in the strings that I can't see. But when I test the lengths, they are both 255 characters long.