Java 替換字符串中替換null 字符

項目中有事會收到不可見字符, 在編輯器中顯示 NUL, 用空字符串替不行.java

0000 0000 0 00 NUL 空字符(Null)

用這個能夠替換編輯器

String res = res.replace(Character.toString('\0'), "");
相關文章
相關標籤/搜索