1 /*
2 * utf8.h: interface to UTF-8 validation
3 *
4 * Based on glib's gutf8.c, which is:
5 * Copyright (C) 1999 Tom Tromey
6 * Copyright (C) 2000 Red Hat, Inc.
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, see
20 * <https://www.gnu.org/licenses/>.
21 */
22
23 #include <stdbool.h>
24 #include <stddef.h>
25
26 bool utf8_validate_len (const char *str, size_t max_len);