New module 'unicase/u8-casemap'.
[gnulib.git] / lib / unicase / unicasemap.h
1 /* Case mapping for UTF-8/UTF-16/UTF-32 strings (locale dependent).
2    Copyright (C) 2009 Free Software Foundation, Inc.
3    Written by Bruno Haible <bruno@clisp.org>, 2009.
4
5    This program is free software: you can redistribute it and/or modify it
6    under the terms of the GNU Lesser General Public License as published
7    by the Free Software Foundation; either version 3 of the License, or
8    (at your option) any later version.
9
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13    Lesser General Public License for more details.
14
15    You should have received a copy of the GNU Lesser General Public License
16    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
17
18 #include <stddef.h>
19
20 #include "unitypes.h"
21 #include "uninorm.h"
22
23 extern uint8_t *
24        u8_casemap (const uint8_t *s, size_t n, const char *iso639_language,
25                    ucs4_t (*single_character_map) (ucs4_t),
26                    size_t offset_in_rule, /* offset in 'struct special_casing_rule' */
27                    uninorm_t nf,
28                    uint8_t *resultbuf, size_t *lengthp);
29
30 extern uint16_t *
31        u16_casemap (const uint16_t *s, size_t n, const char *iso639_language,
32                     ucs4_t (*single_character_map) (ucs4_t),
33                     size_t offset_in_rule, /* offset in 'struct special_casing_rule' */
34                     uninorm_t nf,
35                     uint16_t *resultbuf, size_t *lengthp);
36
37 extern uint32_t *
38        u32_casemap (const uint32_t *s, size_t n, const char *iso639_language,
39                     ucs4_t (*single_character_map) (ucs4_t),
40                     size_t offset_in_rule, /* offset in 'struct special_casing_rule' */
41                     uninorm_t nf,
42                     uint32_t *resultbuf, size_t *lengthp);