java ascii转String
作者:互联网
最近处理asciitoString时,发现晚上多没有处理行,这里解决处理行的问题:
public static String asciiToString(String text) { StringBuilder sbu = new StringBuilder(); String[] line =text.split("\n"); for(String s:line){ String[] chars = s.split(" "); for (String char1 : chars) { sbu.append((char) Integer.parseInt(char1)); } } return sbu.toString(); }
标签:java,String,sbu,char1,text,split,StringBuilder,ascii 来源: https://www.cnblogs.com/ssxz/p/10349042.html