Package org.proforma.variability.util
Class JavascriptString
- java.lang.Object
-
- org.proforma.variability.util.JavascriptString
-
public class JavascriptString extends Object
Utility class for JavaScript compatible UTF-8 encoding and decoding.- See Also:
- Stackoverflow
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
decodeURIComponent(String s)
Decodes the passed UTF-8 String using an algorithm that's compatible with JavaScript'sdecodeURIComponent
function.static String
encodeURIComponent(String s)
Encodes the passed String as UTF-8 using an algorithm that's compatible with JavaScript'sencodeURIComponent
function.
-
-
-
Method Detail
-
decodeURIComponent
public static String decodeURIComponent(String s)
Decodes the passed UTF-8 String using an algorithm that's compatible with JavaScript'sdecodeURIComponent
function. Returnsnull
if the String isnull
.- Parameters:
s
- The UTF-8 encoded String to be decoded- Returns:
- the decoded String
-
-