Code:
char **explode(char *delimiter, char *str, int *numberelements){
char *str2;
char *straux=NULL;
char *strinicio=NULL;
char **result=NULL;
int tokens=1;
str2=(char *)malloc(strlen(str)+1);
strcpy(str2,str);
*numberelements=0;
straux=strinicio=str2;
while(straux){
straux=strstr(strinicio,delimiter);
if (straux){
Leave a comment: