module WeChat::Bot::WeChatEmojiString
Public Instance Methods
convert_emoji()
click to toggle source
# File lib/wechat/bot/ext/wechat_emoji_string.rb, line 3 def convert_emoji emoji_regex = /<span class="emoji emoji(\w+)"><\/span>/ if match = self.match(emoji_regex) return self.gsub(emoji_regex, [match[1].hex].pack("U")) end self end