lib/phonelib/phone_analyzer_helper.rb
# converts symbols in phone to numbers
converts symbols in phone to numbers
converts symbols in phone to numbers
def vanity_converted(phone)
      return phone unless Phonelib.vanity_conversion
      (phone || '').gsub(cr('[a-zA-Z]')) do |c|
        c.upcase!
        n = (c.ord - 65) / 3
        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! n = ( c . ord - 65 ) / 3 n -= 1 if c . match ( Core :: VANITY_4_LETTERS_KEYS_REGEX ) ( n + 2 ) . to_s end end
converts symbols in phone to numbers
converts symbols in phone to numbers
# subtract "A" # account for #7 & #9 which have 4 chars
phone
<not_specific>