java去除字符串后面的\0
private String filterCode(String string) { if (string != null) { string = string.trim(); byte[] zero = new byte[1]; zero[0] = (byte) 0; String s = new String(zero); string = string.replace(s, ""); } return string; }
java去除字符串后面的\0
private String filterCode(String string) { if (string != null) { string = string.trim(); byte[] zero = new byte[1]; zero[0] = (byte) 0; String s = new String(zero); string = string.replace(s, ""); } return string; }
转载于:https://www.cnblogs.com/stono/p/9593816.html