cs_strlcpy

Description

Safe string copy function. Copies at most target_size-1 characters from source_str to target_str, truncating if necessary. The result is always a null terminated string except when source_str or target_str are NULL, or target_size is 0.

Syntax

CS_RETCODE cs_strlcpy(target_str, source_str, target_size)

 CS_CHAR           *target_str;
 CS_CHAR           *source_str;
 CS_INT                *target_size;

Parameters

target_str

The target string where source string is to be copied.

source_str

The source string to be copied.

target_size

Size of the target string

Returns