diff options
author | Chris Toshok <toshok@ximian.com> | 2002-11-08 10:22:50 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2002-11-08 10:22:50 +0800 |
commit | 3d4f29c7c78f5df88c6f4de8a02c87fb299d4482 (patch) | |
tree | 6cada83f76a969f170e3e6888c2045690be07dcd /addressbook/backend | |
parent | f7f7e443ed5ad285fb29cf0fc579dd76bd9fffe4 (diff) | |
download | gsoc2013-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')
-rw-r--r-- | addressbook/backend/ebook/e-book-util.c | 23 | ||||
-rw-r--r-- | addressbook/backend/ebook/e-book-util.h | 3 |
2 files changed, 26 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); +} + diff --git a/addressbook/backend/ebook/e-book-util.h b/addressbook/backend/ebook/e-book-util.h index 71d9cd0c33..3ebea41ef0 100644 --- a/addressbook/backend/ebook/e-book-util.h +++ b/addressbook/backend/ebook/e-book-util.h @@ -85,6 +85,9 @@ void e_book_query_address_default (const gchar EBookHaveAddressCallback cb, gpointer closure); +int e_utf8_casefold_collate_len (const gchar *str1, const gchar *str2, int len); +int e_utf8_casefold_collate (const gchar *str1, const gchar *str2); + G_END_DECLS #endif /* __E_BOOK_UTIL_H__ */ |