All pastes #517381 Raw Edit

Stuff

public c v1 · immutable
#517381 ·published 2007-05-29 01:06 UTC
rendered paste body
char* parse_phonenumber (char* str) {    char number[11] = {0};    /* until we find 10 digits */    while (strlen(number) < 10) {        /* find next digit in the string */        if (str = strpbrk(str, "0123456789")) == NULL) {            return NULL;        }        number[strlen(number)] = *str++;    }    return number;}