fast_strstr
fast_strstr copied to clipboard
fast_strstr return null
Hello) my test example `
char *str = "GET /image/name_image.webp HTTP/1.1"
"Host: host.domain.com:8088"
"Connection: keep-alive"
"Cache-Control: max-age=0"
"DNT: 1"
"Upgrade-Insecure-Requests: 1"
"User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"
"Accept-Encoding: gzip, deflate"
"Accept-Language: ru,uk;q=0.9,en-US;q=0.8,en;q=0.7,ru-RU;q=0.6"
"If-Modified-Since: Sun, 06 Sep 2020 19:15:30 GMT";
int main(void) {
printf("%s\n%s\n", fast_strstr(str, "If"), strstr(str, "If"));
return 1;
}`
result
(null) If-Modified-Since: Sun, 06 Sep 2020 19:15:30 GMT