equals method and single quote
I've this code:
gProvincia = "Reggio nell'Emilia";
if (gProvincia.equals(provincia.getProperty("provincia").toString()))
{
indiceSpinProv = x;
}
It seems that the single quote cause a problem to equals method, because
setting gProvincia as Parma, equals return true when finds the same object
in provincia.getProperty("provincia"). But this doesn't happen when the
gProvince value contains a single quote.
I've also tried escaping the single quote with "\", without success.
Any suggestion?
Thanks!
No comments:
Post a Comment