gpt4 book ai didi

java - 在 TextView 中将 ' 替换为撇号 (')

转载 作者:行者123 更新时间:2023-12-01 06:10:06 25 4
gpt4 key购买 nike

我正在从 API 下载 JSON 数据格式。我一直看到这个符号 (’)。经过研究,我意识到它的意思是“撇号”。这看起来对用户没有吸引力。我如何用真正的撇号替换这个奇怪的字符?谢谢

示例:

"title": "Apple engineers could walk away from FBI’s iPhone demands",
"kwic": "Current and former Apple employees say they’d rather quit than build an iPhone backdoor.",
"content": "",
"url": "http://www.cso.com.au/article/596281/apple-engineers-could-walk-away-from-fbi-iphone-demands/",
"iurl": "http://cdn.cso.com.au/dimg/600x600//idg_sites/logos/cso_1.png",
"domain": "www.cso.com.au",
"author": "",
"news": false,
"votes": "1",
"date": 1458389725517,
"related": [

]
}

将被解析为TextView

最佳答案

试试这个,它将用撇号替换符号

       yourString.replaceAll("’","'");

关于java - 在 TextView 中将 ' 替换为撇号 ('),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36395146/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com