Skip to content

Commit 3f6c73c

Browse files
author
exotikcheat
authored
Add files via upload
1 parent ab7ec59 commit 3f6c73c

31 files changed

+28863
-2
lines changed

CRT.h

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#pragma once
2+
#include <ntifs.h>
3+
static char* stristr(const char* str1, const char* str2) {
4+
const char* p1 = str1;
5+
const char* p2 = str2;
6+
const char* r = *p2 == 0 ? str1 : 0;
7+
8+
while (*p1 != 0 && *p2 != 0)
9+
{
10+
if (tolower((unsigned char)*p1) == tolower((unsigned char)*p2))
11+
{
12+
if (r == 0)
13+
{
14+
r = p1;
15+
}
16+
17+
p2++;
18+
}
19+
else
20+
{
21+
p2 = str2;
22+
if (r != 0)
23+
{
24+
p1 = r + 1;
25+
}
26+
27+
if (tolower((unsigned char)*p1) == tolower((unsigned char)*p2))
28+
{
29+
r = p1;
30+
p2++;
31+
}
32+
else
33+
{
34+
r = 0;
35+
}
36+
}
37+
38+
p1++;
39+
}
40+
41+
return *p2 == 0 ? (char*)r : 0;
42+
}

0 commit comments

Comments
 (0)