Link to home
Start Free TrialLog in
Avatar of yarock
yarock

asked on

Escape special characters in Java

Hi,

I forming a string with a lot of characters that I need to escape, for example


String newStr = new String("\Hi, """ This is \\//complex string");

What I'm looking is there a function I can call to escape the the string automaticlly?

thanks.
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Which ones?
ASKER CERTIFIED SOLUTION
Avatar of Manish
Manish
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial