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
/
string
/
strnlen.c
1
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
2
#include <msvcrti.h>
3
4
5
size_t
6
strnlen
(
const char
*
str
,
size_t
count
)
7
{
8
const char
*
s
;
9
10
if
(
str
==
0
)
11
return
0
;
12
for
(
s
=
str
; *
s
&&
count
; ++
s
,
count
--);
13
return
s
-
str
;
14
}
15