Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Guava: Where is CharEscaper?

Tags:

escaping

guava

I need to encode a string into Javascript text.

By googling I found the very useful function SourceCodeEscapers.javascriptEscaper which should be in Guava in the com.google.common.escape.CharEscaper package.

But it doesn't seem to be there in the actual Guava 13.0.1 release. (Also Dzone has a note about the new CharEscapers in Release 11, but I cannot find anything about it in the release notes.)

Has the CharEscaper-class moved? Was it never in Guava? Will it come in future releases?

like image 295
Sonson123 Avatar asked Sep 04 '12 11:09

Sonson123


1 Answers

It's not in Guava yet, but it will be. As I understand it, the API's still being tweaked and refined before we release it and get locked into supporting backward compatibility.

like image 138
Louis Wasserman Avatar answered Sep 28 '22 00:09

Louis Wasserman