ReactOS
0.4.16-dev-835-gd769f56
strncnt.cpp
Go to the documentation of this file.
1
//
2
// strncnt.cpp
3
//
4
// Copyright (c) Microsoft Corporation. All rights reserved.
5
//
6
// Defines __strncnt(), which returns the number of characters in a string. If
7
// the string is longer than the given 'count', 'count' is returned.
8
//
9
#include <string.h>
10
11
12
13
extern
"C"
size_t
__cdecl
__strncnt
(
14
char
const
*
const
string
,
15
size_t
const
count
16
)
17
{
18
char
const
* it =
string
;
19
size_t
n
= 0;
20
21
for
(; *it &&
n
!=
count
; ++it, ++
n
) { }
22
23
return
n
;
24
}
__cdecl
#define __cdecl
Definition:
accygwin.h:79
count
GLuint GLuint GLsizei count
Definition:
gl.h:1545
n
GLdouble n
Definition:
glext.h:7729
string
char string[160]
Definition:
util.h:11
__strncnt
size_t __cdecl __strncnt(char const *const string, size_t const count)
Definition:
strncnt.cpp:13
sdk
lib
ucrt
string
strncnt.cpp
Generated on Thu Mar 20 2025 06:14:47 for ReactOS by
1.9.6