diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-07-13 09:35:25 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-07-13 09:35:25 +0800 |
commit | e6911693723f9d9c9b274351539f87deffe5beb8 (patch) | |
tree | 55aba4557b0b06837655086341331c7cd661adb0 /camel/string-utils.c | |
parent | 0b66e8a93bd8d91d456015c36b9556fce4c91ec9 (diff) | |
download | gsoc2013-evolution-e6911693723f9d9c9b274351539f87deffe5beb8.tar gsoc2013-evolution-e6911693723f9d9c9b274351539f87deffe5beb8.tar.gz gsoc2013-evolution-e6911693723f9d9c9b274351539f87deffe5beb8.tar.bz2 gsoc2013-evolution-e6911693723f9d9c9b274351539f87deffe5beb8.tar.lz gsoc2013-evolution-e6911693723f9d9c9b274351539f87deffe5beb8.tar.xz gsoc2013-evolution-e6911693723f9d9c9b274351539f87deffe5beb8.tar.zst gsoc2013-evolution-e6911693723f9d9c9b274351539f87deffe5beb8.zip |
Undid clahey's e_strstrcase because e_strstrcase DOES NOT EXIST in
2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
Undid clahey's e_strstrcase because e_strstrcase DOES NOT EXIST
in e-utils/e-utils.c nor anywhere else in Evolution - besides,
Camel should remain independant of Evolution.
* providers/imap/camel-imap-store.c (imap_connect): Fixed Peter's
fix, we don't want to send a string to a %d.
svn path=/trunk/; revision=4132
Diffstat (limited to 'camel/string-utils.c')
-rw-r--r-- | camel/string-utils.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/camel/string-utils.c b/camel/string-utils.c index 418092fd06..5291b12b45 100644 --- a/camel/string-utils.c +++ b/camel/string-utils.c @@ -3,8 +3,8 @@ /* * - * Author : - * Bertrand Guiheneuf <bertrand@helixcode.com> + * Authors: Bertrand Guiheneuf <bertrand@helixcode.com> + * Jeffrey Stedfast <fejj@helixcode.com> * * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com) * @@ -174,3 +174,25 @@ 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 = (gchar *) haystack; *(ptr + len - 1) != '\0'; ptr++) + if (!g_strncasecmp (ptr, needle, len)) + return ptr; + + return NULL; +} + |