diff options
author | lego <lego@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-02-07 13:45:28 +0000 |
---|---|---|
committer | lego <lego@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-02-07 13:45:28 +0000 |
commit | 00255cd1335998b531b6c157e95c73004edfc8df (patch) | |
tree | 3c64cc0160f837e43ec1bf7772829e61c4ae0e67 /epan/strutil.h | |
parent | 909fbd9234cc20af68cf48f26037145331085637 (diff) |
From: Gisle Vanem
The file epan/dissectors/packet-k12.c uses the function
strcasestr() which is not available on e.g. Windows. So I cooked
up a patch to epan/strutil.c to add epan_strcasestr() (is there a more
suited place for such a function?)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20734 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/strutil.h')
-rw-r--r-- | epan/strutil.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/epan/strutil.h b/epan/strutil.h index 10bf242da4..5e5eac1df4 100644 --- a/epan/strutil.h +++ b/epan/strutil.h @@ -205,6 +205,16 @@ guint8 * convert_string_to_hex(const char *string, size_t *nbytes); */ char * convert_string_case(const char *string, gboolean case_insensitive); +/** Finds the first occurence of string 'needle' in string 'haystack'. + * The matching is done in a case insensitive manner. + * + * @param haystack The string possibly containing the substring + * @param needle The substring to be searched + * @return A pointer into 'haystack' where 'needle' is first found. + * Otherwise it returns NULL. + */ +char * epan_strcasestr(const char *haystack, const char *needle); + /* g_strlcat() does not exist in GLib 1.2[.x] */ #if GLIB_MAJOR_VERSION < 2 gsize g_strlcat(gchar *dst, gchar *src, gsize size); |