def vanity_converted(phone)
      return phone unless Phonelib.vanity_conversion

      (phone || '').gsub(cr('[a-zA-Z]')) do |c|
        c.upcase!
        # subtract "A"
        n = (c.ord - 65) / 3
        # account for #7 & #9 which have 4 chars
        n -= 1 if c.match(Core::VANITY_4_LETTERS_KEYS_REGEX)
        (n + 2).to_s
      end
    end
def vanity_converted(phone)
      return phone unless Phonelib.vanity_conversion

      (phone || '').gsub(cr('[a-zA-Z]')) do |c|
        c.upcase!
        # subtract "A"
        n = (c.ord - 65) / 3
        # account for #7 & #9 which have 4 chars
        n -= 1 if c.match(Core::VANITY_4_LETTERS_KEYS_REGEX)
        (n + 2).to_s
      end
    end
converts symbols in phone to numbers