Based on code in libphonenumber, it looks like if there are no leading digits
to match, then the whole pattern has to match the number. So we collect all
patterns, even with no leading digits pattern, and format according to the
first that matches the whole number if there is no leading digits pattern.
This allows US numbers to be properly formatted, for example.
Based on code in libphonenumber, it looks like if there are no leading digits to match, then the whole pattern has to match the number. So we collect all patterns, even with no leading digits pattern, and format according to the first that matches the whole number if there is no leading digits pattern.
This allows US numbers to be properly formatted, for example.