using the strchr() is to see if a particular character is present in a string. Is it possible to find exactly where this character is in the string?
so say i have
is it possible to find at what location the '-' is without doing something like the followingCode:char word[100]; word = "hello there re-tard" strchr(word,'-');
Code:for(i=0;i<strlen(word);i++) { if(word[i] == '-') return i; }