javascript - 如何在 JavaScript 中将特殊符号转换为表情符号?
问题描述
我需要将特殊字符转换为表情符号。
let text = "This time also delivered a big product in an awesome package and fast delivery, and one more thing, this product manufactured on May 19, onlyðððð totally 5¶¶¶¶¶ starts, to this product but front is made up of some type of steel but it is not up to me, remaining is really good";
解决方案
如果要在文本中添加表情符号,可以直接将其添加到字符串中:
https://www.kirupa.com/html5/emoji.htm
另一方面,如果文本是输入并且您希望获取表情符号,则可以使用此包:
推荐阅读
- javascript - VueJS - 发出的事件 - 在其他计算之前显示 HTML
- reactjs - 如何在反应阿波罗中全局处理错误
- java - 使用 .compareTo 比较日期时,为什么不考虑月份?
- php - 如果数据不匹配,如何比较 2 个 PHP 对象数组然后填充空字符串?
- .htaccess - 如何将 Nginx 规则转换为 htaccess?
- django - 尝试以更新配置文件表单获取用户数据时,“用户”对象没有属性“获取”
- javascript - 当图像在视图中时开始视差滚动
- android - 为什么无法将 apk 上传到 google play 控制台?
- c++ - 为什么相同的字符不相等
- php - 使用关联和索引数组循环多维数组