0
我得到的HTML JavaScript字符串,如:如何解码为UTF-8字符串从十六进制编码字符串
htmlString = "https\x3a\x2f\x2ftest.com"
但我想下面将其解码:
str = "https://test.com"
这意味着,我想要一个Util API:
public static String decodeHex(String htmlString){
// do decode and converter here
}
public static void main(String ...args){
String htmlString = "https\x3a\x2f\x2ftest.com";
String str = decodeHex(htmlString);
// str should be "https://test.com"
}
有没有人知道如何实现这个API - decodeHex?
http://ddecode.com/hexdecoder/是好的,但我想一个Java API来实现相同的功能。 –