/** * camel_mempool_strdup: * @pool: a #CamelMemPool * @str: * * Since: 2.32 **/ gchar * camel_mempool_strdup (CamelMemPool *pool, const gchar *str) { gchar *out; out = camel_mempool_alloc (pool, strlen (str) + 1); strcpy (out, str); return out; }
/** * camel_mempool_strdup: (skip) * @pool: a #CamelMemPool * @str: * * Since: 2.32 **/ gchar * camel_mempool_strdup (CamelMemPool *pool, const gchar *str) { gchar *out; gsize out_len; out_len = strlen (str) + 1; out = camel_mempool_alloc (pool, out_len); g_strlcpy (out, str, out_len); return out; }