while((fscanf(datafile, " %127[^;] %[^\n]", name, movie)) == 2) {
printf("%s\n", movie);
for(i=0; i<=strlen(movie); i++) {
if(movie[i]!='\0'){
printf("%c", movie[i]);
} else {
printf("44 %d", i);
break;
}
}
printf("%d\n", strlen(movie));
break;
insert_tree(tree, name, movie);
}
i have this code fscanf reads in all the strings after semicolon but it also reads in long blank spaces after a sentence has ended in the file
how can i make this stop at just the right point??