class Reline::KeyStroke

def start_with?(me, other)

def start_with?(me, other)
  compressed_me = compress_meta_key(me)
  compressed_other = compress_meta_key(other)
  i = 0
  loop do
    my_c = compressed_me[i]
    other_c = compressed_other[i]
    other_is_last = (i + 1) == compressed_other.size
    me_is_last = (i + 1) == compressed_me.size
    if my_c != other_c
      if other_c == "\e".ord and other_is_last and my_c.is_a?(Reline::Key) and my_c.with_meta
        return true
      else
        return false
      end
    elsif other_is_last
      return true
    elsif me_is_last
      return false
    end
    i += 1
  end
end