src/AsYouTypeFormatter.php
private function isNanpaNumberWithNationalPrefix()
    {
        // For NANPA numbers beginning with 1[2-9], treat the 1 as the national prefix. The reason is
        // that national significant numbers in NANPA always start with [2-9] after the national prefix.
        // Numbers beginning with 1[01] can only be short/emergency numbers, which don't need the
        // national prefix.
        return ($this->currentMetadata->getCountryCode() == 1) && (mb_substr($this->nationalNumber, 0, 1) == '1')
            && (mb_substr($this->nationalNumber, 1, 1) != '0') && (mb_substr($this->nationalNumber, 1, 1) != '1');
    }
private function isNanpaNumberWithNationalPrefix()
    {
        // For NANPA numbers beginning with 1[2-9], treat the 1 as the national prefix. The reason is
        // that national significant numbers in NANPA always start with [2-9] after the national prefix.
        // Numbers beginning with 1[01] can only be short/emergency numbers, which don't need the
        // national prefix.
        return ($this->currentMetadata->getCountryCode() == 1) && (mb_substr($this->nationalNumber, 0, 1) == '1')
            && (mb_substr($this->nationalNumber, 1, 1) != '0') && (mb_substr($this->nationalNumber, 1, 1) != '1');
    }
private function isNanpaNumberWithNationalPrefix ( ) { // For NANPA numbers beginning with 1[2-9], treat the 1 as the national prefix. The reason is // that national significant numbers in NANPA always start with [2-9] after the national prefix. // Numbers beginning with 1[01] can only be short/emergency numbers, which don't need the // national prefix. return ( $ this -> currentMetadata -> getCountryCode ( ) == 1 ) && ( mb_substr ( $ this -> nationalNumber , 0 , 1 ) == '1' ) && ( mb_substr ( $ this -> nationalNumber , 1 , 1 ) != '0' ) && ( mb_substr ( $ this -> nationalNumber , 1 , 1 ) != '1' ) ; }
Returns true if the current country is a NANPA country and the national number beings with
the national prefix
@return bool
Returns true if the current country is a NANPA country and the national number beings with the national prefix