My problem is that i want to get the 1st part only of the string ive done based on my code i can get the audio/x-aiff by finding the space but want i want to do is i want to is get or print the .aif is there any way to get that 1st substring thanks in advance
#include <stdio.h>
#include <string.h>
int main(void)
{
char *cptr;
char str[] = ".aif: audio/x-aiff";
char substr[] = " ";
cptr = strstr(str, substr);
printf("%s\n", cptr);
return 0;
}