Sign in
android
/
platform
/
external
/
syslinux
/
refs/heads/oreo-mr1-release
/
.
/
com32
/
lib
/
stpncpy.c
blob: 0537a56c3147ca3bcfe6c1f7c034c4540dcb86c4 [
file
] [
log
] [
blame
] [
edit
]
/*
* stpncpy.c
*
* stpncpy()
*/
#include
<string.h>
char
*
stpncpy
(
char
*
dst
,
const
char
*
src
,
size_t
n
)
{
char
*
q
=
dst
;
const
char
*
p
=
src
;
char
ch
;
while
(
n
--)
{
*
q
=
ch
=
*
p
++;
if
(!
ch
)
break
;
q
++;
}
return
q
;
}