nw::ut::strncpy Function

Syntax

size_t strncpy(
     char * dest,
     std::size_t destCount,
     const char * src,
     std::size_t srcCount
);

Arguments

Name Description
in dest Address of the buffer to be copied to.
in destCount Size of buffer to be copied to.
in src Address of character string to be copied.
in srcCount Copy size.

Return Values

Returns the copied string.

Description

Copies a string.

Copies the character string given by src up to the character count given by srcCount, and always adds a null termination character. Although the character string is truncated if destCount is smaller than srcCount, a null terminator is always added.


CONFIDENTIAL