本文介绍了如何删除“& nbsp;"从java字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Java字符串,该字符串来自程序使用Buffered Reader对象访问的文本文件中的" ".我已经尝试过string.replaceAll(" ",""),但似乎没有用.

I have a java string with " " from a text file the program accesses with a Buffered Reader object. I have tried string.replaceAll(" ","") and it doesn't seem to work.

有什么想法吗?

cleaned = cleaned.replace(" "," ");

推荐答案

cleaned = cleaned.replace("\u00a0","")

这篇关于如何删除“& nbsp;"从java字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 00:34