问题描述
我正在阅读有关新的import Foundation
import Firebase
import FirebaseDatabase
class Post {
private var _username: String!
private var _userImg: String!
private var _postText: String!
private var _postKey: String!
private var _postRef: DatabaseReference!
var username: String {
return _username
}
var userImg: String {
return _userImg
}
var postText: String {
return _postText
}
var postKey: String {
return _postKey
}
init(postText: String,username: String,userImg: String) {
_postText = postText
_username = username
_userImg = userImg
}
init(postKey: String,postData: Dictionary<String,AnyObject>) {
_postKey = postKey
if let username = postData["username"] as? String {
_username = username
}
if let userImg = postData["userImg"] as? String {
_userImg = userImg
}
if let postText = postData["postText"] as? String {
_postText = postText
}
_postRef = Database.database().reference().child("posts").child(_postKey)
}
}
的{{3}} V8博客文章,其中显示了以下示例:
String.prototype.replaceAll
为什么要替换所有水果,而不仅仅是青苹果?
解决方法
几乎可以肯定,这是系统上安装了哪些字体的问题。
当我第一次看到这个问题时,在更换前后,我只看到了方盒。安装“ Noto Emoji”字体并重新启动浏览器后,它为我修复了问题:现在我看到了水果,包括一个番茄代替了苹果。
JavaScript(和V8)可以满足您的期望;您只需要安装系统即可为您正确渲染表情符号。