diff options
author | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-06-16 08:20:45 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-06-16 08:20:45 +0800 |
commit | 57689076e4df4aae59ae7459490a65852b4df1f9 (patch) | |
tree | 258d9c721ff5a6b7a62609fe300c2585d5b40e3b /camel/string-utils.c | |
parent | a0b7ca18e2f59c4d536ca8f02055a1ca8a835e60 (diff) | |
download | gsoc2013-evolution-57689076e4df4aae59ae7459490a65852b4df1f9.tar.gz gsoc2013-evolution-57689076e4df4aae59ae7459490a65852b4df1f9.tar.zst gsoc2013-evolution-57689076e4df4aae59ae7459490a65852b4df1f9.zip |
Started to code the imap summary stuff
svn path=/trunk/; revision=3585
Diffstat (limited to 'camel/string-utils.c')
-rw-r--r-- | camel/string-utils.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/camel/string-utils.c b/camel/string-utils.c index 42fb93538a..28a4a81a0e 100644 --- a/camel/string-utils.c +++ b/camel/string-utils.c @@ -51,11 +51,6 @@ string_list_free (GList *string_list) g_list_free (string_list); } - - - - - GList * string_split (const gchar *string, char sep, const gchar *trim_chars, StringTrimOption trim_options) { @@ -91,7 +86,6 @@ string_split (const gchar *string, char sep, const gchar *trim_chars, StringTrim return result; } - void string_trim (gchar *string, const gchar *trim_chars, StringTrimOption options) { @@ -122,9 +116,6 @@ string_trim (gchar *string, const gchar *trim_chars, StringTrimOption options) } - - - /** * remove_suffix: remove a suffix from a string * @s: the string to remove the suffix from. @@ -183,3 +174,24 @@ string_prefix (const gchar *s, const gchar *suffix, gboolean *suffix_found) return result_string; } + +gchar * +strstrcase (const gchar *haystack, const gchar *needle) +{ + /* find the needle in the haystack neglecting case */ + gchar *ptr; + guint len; + + g_return_val_if_fail (haystack != NULL, NULL); + g_return_val_if_fail (needle != NULL, NULL); + + len = strlen(needle); + if (len > strlen(haystack)) + return NULL; + + for (ptr = haystack; *(ptr + len - 1) != '\0'; ptr++) + if (!g_strncasecmp(ptr, needle, len)) + return ptr; + + return NULL; +} |