I used to fall for this a lot so now most string comparisons I do something like
// string contains string against lower case / no whitespace
cityFromList.indexOf(cityFromPost.trim.toLower())
Might help in your case too?