• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1927
  • Last Modified:

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.
0
yarock
Asked:
yarock
1 Solution
 
CEHJCommented:
Which ones?
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now