Strncpy - Analog Devices VISUALDSP++ 3.5 Manual

C/c++ compiler and library for adsp-219x processors
Hide thumbs Also See for VISUALDSP++ 3.5:
Table of Contents

Advertisement

strncpy

copy characters from one string to another
Synopsis
#include <string.h>
char *strncpy(char *s1, const char *s2, size_t n);
Description
The
function copies up to
strncpy
string pointed to by
copied from
s2
behavior of
strncpy
function returns the new
strncpy
If the
string contains fewer than
s2
with the null character until all
Error Conditions
The
function does not return an error condition.
strncpy
Example
#include <string.h>
char string1[50];
strncpy(string1, "MOREFUN", 4);
string1[4] = '\0';
See Also
memcpy, memmove,
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
into the space pointed to by
s2
is not a null, the result does not end with a null. The
is undefined when the two objects overlap. The
characters have been written.
n
strcpy
C/C++ Run-Time Library
characters of the null-terminated
n
s1
.
s1
characters, the
n
/* MORE is copied into string1 */
/* must null-terminate string1 */
. If the last character
string is padded
s1
3-131

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Related Products for Analog Devices VISUALDSP++ 3.5

Table of Contents