strcopy

Copy string

Description

strcmp( dest[], source[], maxlength=sizeof dest )

Copy the source string to dest.

Parameters

dest destination buffer
source string to be copied
maxlength (optional) maximum number of characters to copy

Return value

Returns number of characters copied.

Example usage

    new s{20};
 
    strcopy(s, "ABCdef");  // returns 6
 
    // s now contains "ABCdef"