Duplicates the src string up to max_len characters (note that characters does not mean bytes with UTF-8).
The caller is responsible to free the returned string using g_free when no longer needed.
| src |
target string. |
| max_len |
max characters to duplicate or -1 for no character limit. |
|
pointer to the newly allocated string. |