aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook/e-book-util.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-11-08 10:22:50 +0800
committerChris Toshok <toshok@src.gnome.org>2002-11-08 10:22:50 +0800
commit3d4f29c7c78f5df88c6f4de8a02c87fb299d4482 (patch)
tree6cada83f76a969f170e3e6888c2045690be07dcd /addressbook/backend/ebook/e-book-util.c
parentf7f7e443ed5ad285fb29cf0fc579dd76bd9fffe4 (diff)
downloadgsoc2013-evolution-3d4f29c7c78f5df88c6f4de8a02c87fb299d4482.tar
gsoc2013-evolution-3d4f29c7c78f5df88c6f4de8a02c87fb299d4482.tar.gz
gsoc2013-evolution-3d4f29c7c78f5df88c6f4de8a02c87fb299d4482.tar.bz2
gsoc2013-evolution-3d4f29c7c78f5df88c6f4de8a02c87fb299d4482.tar.lz
gsoc2013-evolution-3d4f29c7c78f5df88c6f4de8a02c87fb299d4482.tar.xz
gsoc2013-evolution-3d4f29c7c78f5df88c6f4de8a02c87fb299d4482.tar.zst
gsoc2013-evolution-3d4f29c7c78f5df88c6f4de8a02c87fb299d4482.zip
add prototypes for e_utf8_casefold_collate{_len}
2002-11-07 Chris Toshok <toshok@ximian.com> * backend/ebook/e-book-util.h: add prototypes for e_utf8_casefold_collate{_len} * backend/ebook/e-book-util.c (e_utf8_casefold_collate_len): move utf8_casefold_collate_len here. (e_utf8_casefold_collate): move utf8_casefold_collate here. svn path=/trunk/; revision=18654
Diffstat (limited to 'addressbook/backend/ebook/e-book-util.c')
-rw-r--r--addressbook/backend/ebook/e-book-util.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/addressbook/backend/ebook/e-book-util.c b/addressbook/backend/ebook/e-book-util.c
index c27ebff497..46fe732f25 100644
--- a/addressbook/backend/ebook/e-book-util.c
+++ b/addressbook/backend/ebook/e-book-util.c
@@ -752,3 +752,26 @@ e_book_query_address_default (const gchar *email,
e_book_use_default_book (have_address_book_open_cb, info);
}
+
+/* bad place for this i know. */
+int
+e_utf8_casefold_collate_len (const gchar *str1, const gchar *str2, int len)
+{
+ gchar *s1 = g_utf8_casefold(str1, len);
+ gchar *s2 = g_utf8_casefold(str2, len);
+ int rv;
+
+ rv = g_utf8_collate (s1, s2);
+
+ g_free (s1);
+ g_free (s2);
+
+ return rv;
+}
+
+int
+e_utf8_casefold_collate (const gchar *str1, const gchar *str2)
+{
+ return e_utf8_casefold_collate_len (str1, str2, -1);
+}
+