]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/gunicode.h
hashmap, set: remove unused functions
[thirdparty/systemd.git] / src / shared / gunicode.h
1 /* gunicode.h - Unicode manipulation functions
2 *
3 * Copyright (C) 1999, 2000 Tom Tromey
4 * Copyright 2000, 2005 Red Hat, Inc.
5 */
6
7 #include <stdint.h>
8 #include <stdbool.h>
9 #include <stdlib.h>
10
11 char *utf8_prev_char (const char *p);
12
13 extern const char utf8_skip_data[256];
14
15 /**
16 * g_utf8_next_char:
17 * @p: Pointer to the start of a valid UTF-8 character
18 *
19 * Skips to the next character in a UTF-8 string. The string must be
20 * valid; this macro is as fast as possible, and has no error-checking.
21 * You would use this macro to iterate over a string character by
22 * character. The macro returns the start of the next UTF-8 character.
23 * Before using this macro, use g_utf8_validate() to validate strings
24 * that may contain invalid UTF-8.
25 */
26 #define utf8_next_char(p) (char *)((p) + utf8_skip_data[*(const unsigned char *)(p)])
27
28 bool unichar_iswide (uint32_t c);