, , , , - . - /, , ( ). , ( ):
bool strstrexact(const char *str, const char *substr, const char *delim, const bool isRecursiveCall = 0)
{
static int substrLen;
if (!isRecursiveCall)
substrLen = strlen(substr);
if (substrLen <= 0)
return FALSE;
const char *occurence = strstr(str, substr);
if (occurence == NULL)
return FALSE;
occurence += substrLen;
if (*occurence == '\0')
return TRUE;
const char *nextDelim;
nextDelim = strstr(occurence, delim);
if (nextDelim == NULL)
return FALSE;
if (nextDelim == occurence)
return TRUE;
return strstrexact(nextDelim, substr, delim, TRUE);
}
TRUE, FALSE, . :
if (strstrexact((const char*) glGetString(GL_EXTENSIONS), "WGL_ARB_pixel_format", " ")) {
} else {
}