libphonenumber\PhoneNumberUtil::formattingRuleHasFirstGroupOnly PHP Method

formattingRuleHasFirstGroupOnly() public static method

Helper function to check if the national prefix formatting rule has the first group only, i.e., does not start with the national prefix.
public static formattingRuleHasFirstGroupOnly ( string $nationalPrefixFormattingRule ) : boolean
$nationalPrefixFormattingRule string
return boolean
    public static function formattingRuleHasFirstGroupOnly($nationalPrefixFormattingRule)
    {
        $m = preg_match(static::FIRST_GROUP_ONLY_PREFIX_PATTERN, $nationalPrefixFormattingRule);
        return $m > 0;
    }
PhoneNumberUtil