ReactOS
0.4.16-dev-1946-g52006dd
strncat.c
Go to the documentation of this file.
1
/***
2
*strncat.c - append n chars of string to new string
3
*
4
* Copyright (c) Microsoft Corporation. All rights reserved.
5
*
6
*Purpose:
7
* defines strncat() - appends n characters of string onto
8
* end of other string
9
*
10
*******************************************************************************/
11
12
#include <string.h>
13
14
/***
15
*char *strncat(front, back, count) - append count chars of back onto front
16
*
17
*Purpose:
18
* Appends at most count characters of the string back onto the
19
* end of front, and ALWAYS terminates with a null character.
20
* If count is greater than the length of back, the length of back
21
* is used instead. (Unlike strncpy, this routine does not pad out
22
* to count characters).
23
*
24
*Entry:
25
* char *front - string to append onto
26
* char *back - string to append
27
* unsigned count - count of max characters to append
28
*
29
*Exit:
30
* returns a pointer to string appended onto (front).
31
*
32
*Uses:
33
*
34
*Exceptions:
35
*
36
*******************************************************************************/
37
38
char
*
__cdecl
strncat
(
39
char
*
front
,
40
const
char
* back,
41
size_t
count
42
)
43
{
44
char
*
start
=
front
;
45
46
while
(*
front
++)
47
;
48
front
--;
49
50
while
(
count
--)
51
if
((*
front
++ = *back++) == 0)
52
return
(
start
);
53
54
*
front
=
'\0'
;
55
return
(
start
);
56
}
__cdecl
#define __cdecl
Definition:
accygwin.h:79
start
GLuint start
Definition:
gl.h:1545
count
GLuint GLuint GLsizei count
Definition:
gl.h:1545
front
static struct address_cache * front
Definition:
rpcb_clnt.c:83
strncat
_In_opt_ _Locale strncat
Definition:
string.h:263
sdk
lib
ucrt
string
strncat.c
Generated on Thu Dec 4 2025 06:16:23 for ReactOS by
1.9.6