Nick Kahn
Nick Kahn

Reputation: 20078

StringEscapeUtils for character escape

where can i find this class StringEscapeUtils that can automatically escape the characters instead of manualy doing... on my search i found the util called StringEscapeUtils but i could not find in my project or i try to download from net but could not find too... is there a way i can make that automated something like this:

String testStr = "< > \" &"; 
System.out.println("Escaped : " + StringEscapeUtils.escapeHtml(testStr)); 

Upvotes: 2

Views: 36537

Answers (3)

Bernard
Bernard

Reputation: 7961

You need to download the Apache Commons Lang library and include it in your project as a referenced library.

Upvotes: 5

Eugene Retunsky
Eugene Retunsky

Reputation: 13139

org.apache.commons.lang.StringEscapeUtils is a part of the Apache Commons Lang package.

Upvotes: 1

Related Questions