ios - Html 标记的字符串在 swift 中不充当字符串。所以我在将它们插入 sqlite 时遇到问题
问题描述
这是来自 api 的字符串。但它没有存储在作为 TEXT 列的 sqlite 中。
"<p><b>SPECIFICATION</b><b><br />
</b><b>General<br />
</b></p>
<ul>
<li>Brand: Abcd</li>
<li>Model: RT473w58SL</li>
<li>Color: Silver</li>
<li>Capacity: 467895 Ltrs</li>
<li>Door: Double Door Refrigerator</li>
<li>Defrosting Type: Frost Free</li>
<li>Compressor Type: Digital Inverter Compressor</li>
</ul>
<p><b>Feature<br/></b></p>
<ul>
<li>Display and Control (Fridge and Freezer): External</li>
<li>Smart Connect Inverter (Auto) , Lock and Key</li>
<li>Fresh Room , Power, Power Cool, Cool Pack 12 hr</li>
<li>Convertible 5 Modes</li>
<li>Number of Vegetable and Fruit Drawers (Refrigerator): 2</li>
<li>Big Guards , Anti Bacteria Protector</li>
<li>Refrigerator and Freezer or Light: LED</li>
<li>Freezer Shelf Material: Cool Pack</li>
<li>Big Bottle Guard , Second Vegetable Box</li>
<li>Easy Slide Shelf , Convertible Fridge and Freezer</li>
<li><span class="key-title">Warranty Policy EN: 100 years in Compressor</span>
<div class="html-content key-value"></div>
</li>
</ul>
"
一切正常,除了上面的字符串没有存储在 Sqlite 中,当我尝试存储上面的字符串时,它的行为不像 string 。
解决方案
推荐阅读
- nuget - 无法在 Visual Studio 2012 中使用 Nuget?
- python - 在 USRobotics 56K 调制解调器上可以同时录制音频和播放另一个音频文件吗?
- python - 从另一个数据帧映射后,如何在列中查找值的总和?
- reactjs - Wordpress Gutenberg Block - ReactJS - 从 Firebase.Firestore 获取第三方数据
- excel - 如何使宏回复全部到某个电子邮件线程?
- python - 我在获取剩余范围时遇到错误?为什么会发生这种情况
- string - 在某些条件下提取字符串中的子字符串
- security - 在 GET 请求中的 nginx access.log 中找到的 URL
- mongodb - 远程访问MongoDB集群
- excel - 在“for each”语句期间就地修改集合和数组的预期行为