Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对这门语言很陌生。假设我有一个来自 HTTP 请求的字符串,例如
char * request = "GET /favicon.ico HTTP/1.1";
我特别想知道是否favicon在那个请求中,也许是一个布尔值。什么是相对简单的方法来解决这个问题?我知道如何在 Java 中做到这一点,但我对 C 更迷茫。
favicon
谢谢!
if (strstr(request, "favicon") != NULL) { // contains }
strstr(request, "favicon") != NULL