aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-util.c-8611
diff options
context:
space:
mode:
Diffstat (limited to 'e-util/e-util.c-8611')
-rw-r--r--e-util/e-util.c-861118
1 files changed, 18 insertions, 0 deletions
diff --git a/e-util/e-util.c-8611 b/e-util/e-util.c-8611
index d5603d3dfa..33c10aba5c 100644
--- a/e-util/e-util.c-8611
+++ b/e-util/e-util.c-8611
@@ -25,6 +25,7 @@
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
+#include <ctype.h>
#include "e-util.h"
@@ -45,6 +46,23 @@ g_int_compare(const void *x, const void *y)
return -1;
}
+char *
+e_strdup_strip(char *string)
+{
+ int i;
+ int length = 0;
+ int initial = 0;
+ for ( i = 0; string[i]; i++ ) {
+ if (initial == i && isspace(string[i])) {
+ initial ++;
+ }
+ if (!isspace(string[i])) {
+ length = i - initial + 1;
+ }
+ }
+ return g_strndup(string + initial, length);
+}
+
void
e_free_object_list (GList *list)
{