gpt4 book ai didi

iphone - 如何将其中包含HTML标记的字符串显示为纯文本

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

Possible Duplicate:
Remove HTML Tags from an NSString on the iPhone


我正在使用谷歌方向api在我的mapview中显示 map ,它给了我HTML方向字符串,其中包含HTML标签。

现在我想以纯文本显示该字符串,我该怎么做。我的字符串在这里:

    Head <b>southwest</b> toward <b>GH Rd</b>
Exit the roundabout onto <b>GH Rd</b><div style="font-size:0.9em">Go through 1 roundabout</div>
At the roundabout, take the <b>1st</b> exit onto <b>Road Number 2</b><div style="font-size:0.9em">Pass by myonlinesearch.blogspot.com (on the left in 600&nbsp;m)</div>
At the roundabout, take the <b>3rd</b> exit onto <b>CH Rd</b>
At <b>Indroda Cir</b>, take the <b>2nd</b> exit onto <b>Gandhinagar Ahmedabad Rd/SH 71</b><div style="font-size:0.9em">Continue to follow Gandhinagar Ahmedabad Rd</div><div style="font-size:0.9em">Go through 1 roundabout</div>
At the roundabout, take the <b>1st</b> exit onto <b>Sardar Patel Ring Rd</b>
At <b>Ranasan Cir</b>, take the <b>3rd</b> exit onto <b>NH 8</b><div style="font-size:0.9em">Pass by Galaxy Restaurant (on the left in 4.3&nbsp;km)</div>
Turn <b>left</b> onto <b>Galaxy Rd</b><div style="font-size:0.9em">Pass by Shiv Shakti Food Fort (on the left)</div>
Turn <b>left</b> onto <b>NH 59</b>
Turn <b>right</b><div style="font-size:0.9em">Go through 1 roundabout</div>
Turn <b>right</b>
Turn <b>left</b><div style="font-size:0.9em">Destination will be on the right</div>

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