Upgrade to Pro — share decks privately, control downloads, hide ads and more …

電話番号を扱う技術

 電話番号を扱う技術

Shota Iguchi

October 21, 2017
Tweet

More Decks by Shota Iguchi

Other Decks in Technology

Transcript

  1. libphonenumberͷίί͕ੌ͍ TelephoneNumber.valid?('8180XXXXXXXX') # => true TelephoneNumber.valid?('+81 80 XXXX XXXX') #

    => true TelephoneNumber.valid?('080 XXXX XXXX', 'JP') # => true require 'telephone_number' telephone_number = TelephoneNumber.parse('8180XXXXXXXX') telephone_number.e164_number # => +8180XXXXXXXX telephone_number.national_number # => 080-XXXX-XXXX telephone_number.country.country_id # => JP telephone_number.valid_types # => [:mobile] github.com/mobi/telephone_number github.com/iguchi1124/global_phone_number ruby port library (WIP)