> while (*r) > { > if (*r == '/') > { > r++; > n = r; > } > }
It's not even that. A for loop would do it:
for ( ; *r; r++ ) n = r+1;