python判断输入的内容是否是emoji表情:
"""
@描述 根据传入的content,判断是否是emoji字符。
@return True是emoji,False不是True是emoji。
"""
@staticmethod
def isEmoji(content):
if not content:
return False
if u"\U0001F600" <= content and content <= u"\U0001F64F":
return True
elif u"\U0001F300" <= content and content <= u"\U0001F5FF":
return True
elif u"\U0001F680" <= content and content <= u"\U0001F6FF":
return True
elif u"\U0001F1E0" <= content and content <= u"\U0001F1FF":
return True
else:
return False