Get a substring by from to char
//arr[3]=sip:+886233170007@ims3.ca.com
char *head_point=strchr(arr[3],'+');
char *tail_point=strchr(arr[3],'@');
if(head_point==NULL||tail_point==NULL)
{
printf("Subscriber Number paser Error....\n");
strcpy(callingNumber," ");
}
else
{
int temp_len=(tail_point-(head_point+1));
memcpy(callingNumber,head_point+1,temp_len);
}
//callingNumber =886233170007
留言
張貼留言