I am looking for a way to take phone numbers Input from an end user, given the various ways that can be formatted, and reformat it in a more standardized way. My end users work with only US phone numbers. Looking at the C# port of google's LibPhoneNumber, I assume it was made for exactly this task, but I can't figure out its usage.
My goals for output is to standardize on 999-999-9999 format.
So if the user inputs (516)666-1234, I want to output 516-666-1234.
If the users inputs 5166661234, I want to output 516-666-1234.
If possible, if the user inputs (516)666-1234x102, I'd like the output to be 516-666-1234x102
If the library can't handle extensions, I'll deal with that problem externally.
What calls do I have to make to produce the desired output?
Alternatively, can you provide a link that provides the answer to my question?