1 3448adb0 2022-11-02 op /* See LICENSE file for copyright and license details. */
2 3448adb0 2022-11-02 op #ifndef GRAPHEME_H
3 3448adb0 2022-11-02 op #define GRAPHEME_H
5 3448adb0 2022-11-02 op #include <stdbool.h>
6 3448adb0 2022-11-02 op #include <stddef.h>
7 3448adb0 2022-11-02 op #include <stdint.h>
9 3448adb0 2022-11-02 op #define GRAPHEME_INVALID_CODEPOINT UINT32_C(0xFFFD)
11 3448adb0 2022-11-02 op size_t grapheme_decode_utf8(const char *, size_t, uint_least32_t *);
12 3448adb0 2022-11-02 op size_t grapheme_encode_utf8(uint_least32_t, char *, size_t);
14 3448adb0 2022-11-02 op bool grapheme_is_character_break(uint_least32_t, uint_least32_t, uint_least16_t *);
16 3448adb0 2022-11-02 op bool grapheme_is_lowercase(const uint_least32_t *, size_t, size_t *);
17 3448adb0 2022-11-02 op bool grapheme_is_titlecase(const uint_least32_t *, size_t, size_t *);
18 3448adb0 2022-11-02 op bool grapheme_is_uppercase(const uint_least32_t *, size_t, size_t *);
20 3448adb0 2022-11-02 op bool grapheme_is_lowercase_utf8(const char *, size_t, size_t *);
21 3448adb0 2022-11-02 op bool grapheme_is_titlecase_utf8(const char *, size_t, size_t *);
22 3448adb0 2022-11-02 op bool grapheme_is_uppercase_utf8(const char *, size_t, size_t *);
24 3448adb0 2022-11-02 op size_t grapheme_next_character_break(const uint_least32_t *, size_t);
25 3448adb0 2022-11-02 op size_t grapheme_next_line_break(const uint_least32_t *, size_t);
26 3448adb0 2022-11-02 op size_t grapheme_next_sentence_break(const uint_least32_t *, size_t);
27 3448adb0 2022-11-02 op size_t grapheme_next_word_break(const uint_least32_t *, size_t);
29 3448adb0 2022-11-02 op size_t grapheme_next_character_break_utf8(const char *, size_t);
30 3448adb0 2022-11-02 op size_t grapheme_next_line_break_utf8(const char *, size_t);
31 3448adb0 2022-11-02 op size_t grapheme_next_sentence_break_utf8(const char *, size_t);
32 3448adb0 2022-11-02 op size_t grapheme_next_word_break_utf8(const char *, size_t);
34 3448adb0 2022-11-02 op size_t grapheme_to_lowercase(const uint_least32_t *, size_t, uint_least32_t *, size_t);
35 3448adb0 2022-11-02 op size_t grapheme_to_titlecase(const uint_least32_t *, size_t, uint_least32_t *, size_t);
36 3448adb0 2022-11-02 op size_t grapheme_to_uppercase(const uint_least32_t *, size_t, uint_least32_t *, size_t);
38 3448adb0 2022-11-02 op size_t grapheme_to_lowercase_utf8(const char *, size_t, char *, size_t);
39 3448adb0 2022-11-02 op size_t grapheme_to_titlecase_utf8(const char *, size_t, char *, size_t);
40 3448adb0 2022-11-02 op size_t grapheme_to_uppercase_utf8(const char *, size_t, char *, size_t);
42 3448adb0 2022-11-02 op #endif /* GRAPHEME_H */