aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'e-util/e-util.c')
-rw-r--r--e-util/e-util.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/e-util/e-util.c b/e-util/e-util.c
index 1696338858..5d8e9b19db 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -1592,3 +1592,29 @@ e_strdup_append_strings (gchar *first_string, ...)
return buffer;
}
+
+gchar **
+e_strdupv (const gchar **str_array)
+{
+ if (str_array) {
+ gint i;
+ gchar **retval;
+
+ i = 0;
+ while (str_array[i])
+ i++;
+
+ retval = g_new (gchar*, i + 1);
+
+ i = 0;
+ while (str_array[i]) {
+ retval[i] = g_strdup (str_array[i]);
+ i++;
+ }
+ retval[i] = NULL;
+
+ return retval;
+ } else {
+ return NULL;
+ }
+}