Closed rromanchuk closed 11 years ago
The CallingCodeInfo is a private implementation detail. It is not something I'd like to see exposed to the public API. Of course you are free to do so in your own copy of the code. Feel free to create a fork and make whatever changes suit your needs. Enjoy.
Yeah I have, maybe not this entire dictionary, but I just thought it would be nice if the client could ask "What is the country code for this string?" Once the string is formatted and valid there's no good way to get it's pieces back without basically reimplementing the entire library. There is also no way to get the unformatted string back, these are valuable for anyone who is working push form data to an API.
Adding a method that takes a phone number string and returns its country code makes sense. I will consider adding that feature.
There is no need to get the "unformatted string" back. Your own code already has a reference to the string you pass into RMPhoneFormat.
it would be cool if there was a way to grab the updated CallingCodeInfo object from an instance of RMPhoneFormat so the client can easily grab parsed information about the current string thats being processed.
I can make the change if you don't see anything architecturally incorrect