summaryrefslogtreecommitdiffstats
path: root/util/strgutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/strgutil.c')
-rw-r--r--util/strgutil.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/util/strgutil.c b/util/strgutil.c
index 3e5999d43..c6c8f5a65 100644
--- a/util/strgutil.c
+++ b/util/strgutil.c
@@ -72,6 +72,18 @@ strlist_last( STRLIST node )
}
+
+
+int
+memicmp( const char *a, const char *b, size_t n )
+{
+ for( ; n; n--, a++, b++ )
+ if( *a != *b && toupper(*(const byte*)a) != toupper(*(const byte*)b) )
+ return *(const byte *)a - *(const byte*)b;
+ return 0;
+}
+
+
/****************
* look for the substring SUB in buffer and return a pointer to that
* substring in BUF or NULL if not found.