我正在开发安卓应用程序。我正在从服务器获取数据。但是从服务器获取的数据包含一些标点错误。设置文本时如何在android中删除此类类型?
1 回答
1
If ' is always replaced with ? then you could use one of the replace functions:
String label = "patient?s";
String fixedLabel = label.replace('?', '\'');
This will replace all instances of ? with ' in the string.
I am not sure if this is what you are asking though?
See the string documentation: http://developer.android.com/reference/java/lang/String.html
于 2013-06-03T10:01:41.623 回答