afc_string_copy

Name

afc_string_copy  -- Copy a string inside an AFC string_new

Synopsis

char * afc_string_copy (char * deststring, const char * sourcestring, unsigned long len);

Description

Use this function to copy a string inside an AFC string_new. This afc_string_copy() is advanced considering the usual C strcpy command: it does bound checking so you don't have to do any control before copying.

Inputs

deststring

Destination string. This string MUST be an AFC string_new created using @{" afc_string_new() " LINK afctools_string}

sourcestring

Source string. This string can be anything, a static string, a AFC string_new, a memory area...

len

Here you can specify how many chars to copy. Pass the value *ALL* to copy the whole string.

Result

Note

afc_string_copy() can handle NULL pointers.

See Also