我正在寻找一个简单的功能,可以删除Instagram评论中的表情符号字符.我现在尝试过的(我在SO和其他网站上找到的示例代码中有很多代码):
// PHP class
public static function removeEmoji($string)
{
// split the string into UTF8 char array
// for loop inside char array
// if char is emoji, remove it
// endfor
// return newstring
}
Run Code Online (Sandbox Code Playgroud)
任何帮助,将不胜感激
如何删除以下字符串中的所有表情符号?
Lorem ipsum dolor坐下来,精致的adipistur elit.