摘要:
public class BinaryConverter { // 将字符串转换成二进制字符串,以空格相隔 public static String stringToBinaryString(String str) { char[] strChar = str.toCharArray(); String result = ""; for (int i = 0; i 0; j--) output.append('0'); output.append(tempStr[i] + " "); } return output.toString(); 阅读全文