#include <stdbool.h>
#include <stdlib.h>
Go to the source code of this file.
◆ is_base_char
#define is_base_char |
( |
| ch | ) |
|
Value:
bool _dom_is_character_in_group(unsigned int ch, const struct xml_char_group *group)
Definition character_valid.c:174
const struct xml_char_group base_char_group
Definition character_valid.c:66
◆ is_char
Value:
const struct xml_char_group char_group
Definition character_valid.c:74
◆ is_combining_char
#define is_combining_char |
( |
| ch | ) |
|
Value:
const struct xml_char_group combining_char_group
Definition character_valid.c:104
◆ is_digit
Value:
const struct xml_char_group digit_char_group
Definition character_valid.c:115
◆ is_extender
#define is_extender |
( |
| ch | ) |
|
Value:
const struct xml_char_group extender_group
Definition character_valid.c:125
◆ is_ideographic
#define is_ideographic |
( |
| ch | ) |
|
Value:
const struct xml_char_group ideographic_group
Definition character_valid.c:133
◆ is_letter
Value:
#define is_ideographic(ch)
Definition character_valid.h:49
#define is_base_char(ch)
Definition character_valid.h:43
◆ _dom_is_character_in_group()
bool _dom_is_character_in_group |
( |
unsigned int | ch, |
|
|
const struct xml_char_group * | group ) |
Test whether certain character beint32_ts to some XML character group
- Parameters
-
ch | The character being tested |
group | The character group |
- Returns
- true if the character beint32_ts to the group, false otherwise.
Generally, we use an algorithm like binary search to find the desired character in the group. The time complexity is about lg(n) and here n is at most 180, so, I think the algorithm is fast enough for name validation.
◆ base_char_group
◆ char_group
◆ combining_char_group
◆ digit_char_group
◆ extender_group
◆ ideographic_group