cbits/pii.c
static inline bool check_international_phone(const char *buf, size_t n) {
	size_t i;
	int phone_chars = 0;
	/* We need exactly 11 digits, but don't care if there are
	   filler characters as well. */
	for (i = 0; i < n; i++) {
		if (is_digit(buf[i])) {
			phone_chars++;
		} else if (!is_number_filler(buf[i])) {
			return FALSE;
		}
	}
	return (phone_chars == 11);
}
/* Matches numbers of the form +xxxxxxxxxxx
   Expects the initial '+' to be removed/already checked. */
Matches numbers of the form +xxxxxxxxxxx
Expects the initial '+' to be removed/already checked.
Matches numbers of the form + xxxxxxxxxxx Expects the initial ' + ' to be removed / already checked .
static inline bool check_international_phone(const char *buf, size_t n) {
	size_t i;
	int phone_chars = 0;
	for (i = 0; i < n; i++) {
		if (is_digit(buf[i])) {
			phone_chars++;
		} else if (!is_number_filler(buf[i])) {
			return FALSE;
		}
	}
	return (phone_chars == 11);
}
static inline bool check_international_phone ( const char * buf , size_t n ) { size_t i ; int phone_chars = 0 ; for ( i = 0 ; i < n ; i ++ ) { if ( is_digit ( buf [ i ] ) ) { phone_chars ++ ; } else if ( ! is_number_filler ( buf [ i ] ) ) { return FALSE ; } } return ( phone_chars == 11 ) ; }
Matches numbers of the form +xxxxxxxxxxx
Expects the initial '+' to be removed/already checked.
Matches numbers of the form + xxxxxxxxxxx Expects the initial ' + ' to be removed / already checked .
/* We need exactly 11 digits, but don't care if there are
	   filler characters as well. */