diff options
author | Gerald Combs <gerald@wireshark.org> | 2004-08-13 02:39:49 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2004-08-13 02:39:49 +0000 |
commit | 2875ddd2692404005c9847f27e19fe1f5a92ae07 (patch) | |
tree | 96a0ccdc12ce0e505271bd5fb4ecca2b95228136 /epan/strutil.h | |
parent | 08b751f7557429383cb8fddf6c6a4bc4988e8657 (diff) | |
download | wireshark-2875ddd2692404005c9847f27e19fe1f5a92ae07.tar.gz wireshark-2875ddd2692404005c9847f27e19fe1f5a92ae07.tar.bz2 wireshark-2875ddd2692404005c9847f27e19fe1f5a92ae07.zip |
Move convert_string_to_hex() and convert_string_case() from gtk/find_dlg.c
to epan/strutil.c
svn path=/trunk/; revision=11733
Diffstat (limited to 'epan/strutil.h')
-rw-r--r-- | epan/strutil.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/epan/strutil.h b/epan/strutil.h index 17136f3d72..beacb3b573 100644 --- a/epan/strutil.h +++ b/epan/strutil.h @@ -125,4 +125,23 @@ const guint8 * epan_memmem(const guint8 *haystack, guint haystack_len, #define _STRINGIFY(a) # a #define STRINGIFY(a) _STRINGIFY(a) +/** Scan a string to make sure it's valid hex. + * + * @param string The string to validate + * @param nbytes The length of the return buffer + * @return A pointer to a buffer containing the converted raw bytes. This + * buffer must be g_free()d by the caller. + */ +guint8 * convert_string_to_hex(const char *string, size_t *nbytes); + +/** Prep a string for case-sensitive vs case-insensitive searching. + * + * @param string The search string + * @param case_sensitive TRUE if case-sensitive, FALSE if not + * @return A direct copy of the string if it's a case-sensitive search and + * an uppercased version if not. In either case the string must be g_free()d + * by the caller. + */ +char * convert_string_case(const char *string, gboolean case_insensitive); + #endif /* __STRUTIL_H__ */ |