i have the following code to find the first words of a file....but my words are seperated by ":" it tried to put : along with \n an \0 but it still doesnt find the word it just finds the whole line
len = strlen(buf[cnt]);
if (buf[cnt][len-1] == '\n')
buf[cnt][len-1] = '\0';
cnt++;