From b0bbe73658c3083bfcdcca93831a88972b620f2c Mon Sep 17 00:00:00 2001 From: Sushma Rai Date: Tue, 4 Oct 2005 13:06:08 +0000 Subject: dded case insensitive compare support etable, and using it for Organization filed. Fixes #207110. Patch submitted by "Devashish Sharma " svn path=/trunk/; revision=30489 --- e-util/e-util.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'e-util/e-util.c') diff --git a/e-util/e-util.c b/e-util/e-util.c index 7a9f81d81b..bf4fe6292b 100644 --- a/e-util/e-util.c +++ b/e-util/e-util.c @@ -57,6 +57,19 @@ g_str_compare (const void *x, const void *y) return strcmp (x, y); } +int +g_str_case_compare (const void *x, const void *y) +{ + if (x == NULL || y == NULL) { + if (x == y) + return 0; + else + return x ? -1 : 1; + } + + return g_utf8_collate (g_utf8_casefold (x, -1), g_utf8_casefold (y, -1)); +} + int g_collate_compare (const void *x, const void *y) { -- cgit