UTF-8 rune (Unicode code point) methods. More...


Go to the source code of this file.
Data Structures | |
| struct | sys_rune_tokenize_t |
| Tokenizer state, grouping a stream into maximal runs of same-class runes. More... | |
Macros | |
| #define | RUNE_ERROR ((rune_t)0xFFFD) |
| Sentinel value for a malformed UTF-8 sequence. More... | |
Typedefs | |
| typedef int32_t | rune_t |
| A single decoded Unicode code point. More... | |
| typedef struct sys_rune_tokenize_t | sys_rune_tokenize_t |
| Tokenizer state, grouping a stream into maximal runs of same-class runes. More... | |
Enumerations | |
| enum | sys_rune_class_t { sys_rune_other = 0, sys_rune_space, sys_rune_digit, sys_rune_alpha, sys_rune_punct, sys_rune_symbol, sys_rune_control } |
| Classification of a rune, or of a maximal run of same-class runes. More... | |
Functions | |
| const char * | sys_rune_next (const char *str, rune_t *rune) |
| Decode the next UTF-8 rune from a string. More... | |
| size_t | sys_rune_count (const char *str) |
| Count the runes in a UTF-8 string. More... | |
| bool | sys_rune_valid (const char *str) |
| Check whether a string is well-formed UTF-8. More... | |
| static bool | sys_rune_is_digit (rune_t r) |
| Reports whether r is a decimal digit. | |
| static bool | sys_rune_is_space (rune_t r) |
| Reports whether r is a space character (space, \t, \n, \v, \f, \r, U+0085 NEL, or U+00A0 NBSP). | |
| static bool | sys_rune_is_upper (rune_t r) |
| Reports whether r is an uppercase letter. | |
| static bool | sys_rune_is_lower (rune_t r) |
| Reports whether r is a lowercase letter. | |
| static bool | sys_rune_is_alpha (rune_t r) |
| Reports whether r is a letter. | |
| static rune_t | sys_rune_to_upper (rune_t r) |
| Converts r to its uppercase form, if it has one. More... | |
| static rune_t | sys_rune_to_lower (rune_t r) |
| Converts r to its lowercase form, if it has one. More... | |
| static bool | sys_rune_is_punct (rune_t r) |
| Reports whether r is a punctuation character. More... | |
| static bool | sys_rune_is_symbol (rune_t r) |
| Reports whether r is a symbol character (math, currency, or modifier symbols). More... | |
| static bool | sys_rune_is_control (rune_t r) |
| Reports whether r is a control character. | |
| sys_rune_class_t | sys_rune_isa (rune_t r) |
| Classify a single rune. More... | |
| sys_rune_tokenize_t | sys_rune_tokenize_init (sys_iostream_t *stream) |
| Initialize a tokenizer over a stream. More... | |
| bool | sys_rune_tokenize_next (sys_rune_tokenize_t *it) |
| Advance to the next maximal run of same-class runes. More... | |
| size_t | sys_rune_tokenize_token (sys_rune_tokenize_t *it, char *buf, size_t cap) |
| Read the current token's text. More... | |
UTF-8 rune (Unicode code point) methods.
Definition in file rune.h.