strfind.cc (250B)
1 #include "netbuffer" 2 3 unsigned Netbuffer::strfind(char const *s) const { 4 PROFILE("Netbuffer::strfind"); 5 6 if (!buf_sz) 7 return (0); 8 9 char *cp = strnstr(buf_data, s, buf_sz); 10 if (cp) 11 return (cp - buf_data); 12 13 return (0); 14 } 15