Get '00' instead of '+' in international phone number
Closed this issue · 1 comments
nicolasrouanne commented
Is there a way to get 00
instead of +
in an international phone number?
Something like that:
Phonelib.parse('+33601020304').international(prefix: "00")
=> "0033601020304"
It could be also another method, such as .international_00
I can open a PR if issue is accepted 😃
daddyz commented
@nicolasrouanne Hi, I implemented required behavior a bit different. Anyway thanks for PR.
p = Phonelib.parse '1 212 555 1234'
p.international('00') # => "001 212-555-1234"
p.international_00 # => "001 212-555-1234"
p.international_xx # => "xx1 212-555-1234"
p.e164('+') # => "+12125551234"
p.e164_00 # => "0012125551234"