projects
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Use free Windows DDK and compile with latest MinGW releases.
[reactos.git]
/
reactos
/
lib
/
msvcrt
/
wstring
/
wcsstr.c
1
#include <msvcrti.h>
2
3
4
wchar_t
*
wcsstr
(
const wchar_t
*
s
,
const wchar_t
*
b
)
5
{
6
wchar_t
*
x
;
7
wchar_t
*
y
;
8
wchar_t
*
c
;
9
x
=(
wchar_t
*)
s
;
10
while
(*
x
) {
11
if
(*
x
==*
b
) {
12
y
=
x
;
13
c
=(
wchar_t
*)
b
;
14
while
(*
y
&& *
c
&& *
y
==*
c
) {
15
c
++;
16
y
++;
17
}
18
if
(!*
c
)
19
return
x
;
20
}
21
x
++;
22
}
23
return
NULL
;
24
}