3 * Copyright (C) 2007-2009 Jim Evins <evins@snaught.com>.
5 * This file is part of libglabels.
7 * libglabels is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * libglabels is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with libglabels. If not, see <http://www.gnu.org/licenses/>.
26 /*===========================================*/
28 /*===========================================*/
31 /*===========================================*/
33 /*===========================================*/
36 /*===========================================*/
37 /* Local function prototypes */
38 /*===========================================*/
41 /*===========================================*/
43 /*===========================================*/
46 * lgl_str_utf8_casecmp:
47 * @s1: string to compare with s2.
48 * @s2: string to compare with s1.
50 * Compare two UTF-8 strings, ignoring the case of characters.
52 * This function should be used only on strings that are known to be encoded
53 * in UTF-8 or a compatible UTF-8 subset.
55 * Returns: 0 if the strings match, a negative value if s1 < s2,
56 * or a positive value if s1 > s2.
60 lgl_str_utf8_casecmp (const gchar *s1,
67 folded_s1 = g_utf8_casefold (s1, -1);
68 folded_s2 = g_utf8_casefold (s2, -1);
70 result = g_utf8_collate (folded_s1, folded_s2);
81 * Local Variables: -- emacs
83 * c-basic-offset: 8 -- emacs
84 * tab-width: 8 -- emacs
85 * indent-tabs-mode: nil -- emacs