aboutsummaryrefslogtreecommitdiffstats
path: root/util/strgutil.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1998-04-30 14:06:01 +0000
committerWerner Koch <[email protected]>1998-04-30 14:06:01 +0000
commit448f8e53fe3e5d5ac54fe7151e512acbb6114ad5 (patch)
tree5cb5878aaff2738558b1355f5f17b48d300cb145 /util/strgutil.c
parentNEw (diff)
downloadgnupg-448f8e53fe3e5d5ac54fe7151e512acbb6114ad5.tar.gz
gnupg-448f8e53fe3e5d5ac54fe7151e512acbb6114ad5.zip
*** empty log message ***
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.