str_cpy(STRING* string, char* content)
Copies a character sequence into
a STRING.
Parameters:
string - target STRING pointer.
content
- source STRING pointer or char array.
Returns:
string
Modifies:
string
Remarks:
- If string has a fixed
length and is shorter than content, the result
will be truncated.
- Source and target strings must not be identical.
Speed:
FastExample:
// erase a string the easy way, by copying an empty string over :
function delete_string(str)
{
str_cpy(str," "); // string has now empty content
}
See also:
STRING, str_cat, str_cmp, str_cmpi, str_cmpni, str_len, str_clip, str_trunc, str_stri