I have two variables but same value, one is a String that is retrieved from a database, and the other is generated in the program. For exemple :
String encodedImage="FFD8FFFE002460000D11000000000000000000000000000000F0004001230032"
+"120B510451040000FFDB008400090607080705090807080A09090A0D160E0D0C";
//this is the variable generated in the program
String vartable="FFD8FFFE002460000D11000000000000000000000000000000F0004001230032\r\n120B510451040000FFDB008400090607080705090807080A09090A0D160E0D0C
// this is the string retrieved from database, it is a json then parsed to a string
The string is a representation of a picture so it is much longer but here is the first two lines. The problem is that if I compare the 2 string
if( encodedImage.equalsIgnoreCase(vartable)
I obtain that the 2 string does not match Any help ? I am doing a android application and I must have the same string to have the same picture