def replace_character(string, &block)
      string.gsub(character_pattern) do |character|
        block.call(find_by_character(character), character)
      end
    end
def replace_character(string, &block)
      string.gsub(character_pattern) do |character|
        block.call(find_by_character(character), character)
      end
    end
Replaces emoji characters in a given string with a given block result
 @param string [String] a string that to be replaced
 @return [String] a replaced result
 @example
   Somemoji.emoji_collection.replace_character("I ❤ Emoji") do |emoji|
     %(<img alt="#{emoji.character}" class="emoji" src="/images/emoji/#{emoji.base_path}.png">)
   end
   #=> 'I <img alt="❤" class="emoji" src="/images/emoji/unicode/2764.png"> Emoji'