Is there a way to search backwards through a character array without using the STL? I've tried using strrchr() but I can't get it to search the 2nd instance backwards.
thanks
friz
An option would be to create your own upgraded version of strrchr, taking an additional parameter that points to the last character in the string to be searched:
1 2 3 4 5 6 7
constchar * mystrrchr ( constchar * str, int character, char * end )
{
while (end!=str)
if (*end == character) return end;
else --end;
return 0;
}