java - Unable to remove white space in String -
this question has answer here:
- removing whitespace strings in java 25 answers
i'm trying remove white space in string, adressstring (see below).
to so, i'm using folowing piece of code :
adressstring.replaceall("\r","");
however, not work : i'm stil having whitespace (see below) :
solution :
i needed declare string :
string adresswithoutcarriagereturn = adressstring.replaceall("\r", "");
just add 1 more slash below:
adressstring.replaceall("\\r","");
as "\" special character.
Comments
Post a Comment