private static String unknow2chines(String str){
		String result = "";
		int start = 0, end = 0;
		while(start < str.length())
		{
			start = str.indexOf("&#", end);
			if(start >= 0){
				result += str.substring(end, start);
				start = start + 2;
				end = str.indexOf(";", start);
				if(end >= 0)
				{
					String temp = str.substring(start, end);
					int a = Integer.valueOf(temp);					
					char[] ch = new char[]{(char) a};					
					result += new String(ch);
					start = ++end;
				}else{
					return result + "&#" + str.substring(start);
				}
			}else{
				return result + str.substring(end);
			}
		}
		return result.trim();
	}

相关文章:

  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2022-02-08
  • 2022-02-21
  • 2022-12-23
  • 2021-11-07
相关资源
相似解决方案