本文介绍了删除ASCII问号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从另一个应用程序传递了以下字符串.

I have the following String passed from another application.

2�4�9�

(2� 4� 9�)

(2�4�9�)

我想从上述字符串中删除问号ascii字符.

I would like to remove question mark ascii characters from the above string.

我该怎么办?

推荐答案

根据此 Unicode代码表�(或\ufffd)字符�.

According to this Unicode code table, � (or \ufffd) is the character �.

您可以使用以下命令从字符串中删除此Unicode字符:

You can remove this unicode character from your string with :

str = str.replaceAll("�", "");

但是您应该真正地理解为什么为什么.

But you should really try to understand why they are there.

这篇关于删除ASCII问号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 05:14