java - Unable to remove white space in String -


this question has answer here:

i'm trying remove white space in string, adressstring (see below).

enter image description here

to so, i'm using folowing piece of code :

adressstring.replaceall("\r","");

however, not work : i'm stil having whitespace (see below) :

enter image description here

solution :

i needed declare string :

string adresswithoutcarriagereturn = adressstring.replaceall("\r", "");

just add 1 more slash below:

adressstring.replaceall("\\r",""); 

as "\" special character.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -