What can I do to make this better?
I have to take a phone number in the form of (111) 111-1111 and display only the numbers. I must use the strtok function. This is the function I wrote to do this but am looking for something that is better and for someone to explain if I used a poor practice. My driver just sends an array that I assign the number above.
char *separate(char *string1)
token = strtok(string1, "() -");
string1 = token;
while ((token = strtok(NULL, "() -")) != NULL)