utf8_counter Struct Reference

## Public Types

typedef size_t | value_type

## Static Public Member Functions

static value_type | low (value_type result, uint32_t ch)
static value_type | high (value_type result, uint32_t)

## Detailed Description

Definition at line 762 of file pugixml.cpp.

## Member Typedef Documentation

## value_type

typedef size_t utf8_counter::value_type

Definition at line 764 of file pugixml.cpp.

## Member Function Documentation

## high()

static value_type utf8_counter::high | ( | value_type | result,
|  | uint32_t |
| ) |  |

inline static

Definition at line 776 of file pugixml.cpp.

{
// U+10000..U+10FFFF
return result + 4;
}

## low()

static value_type utf8_counter::low | ( | value_type | result,
|  | uint32_t | ch
| ) |  |

inline static

Definition at line 766 of file pugixml.cpp.

{
// U+0000..U+007F
if (ch < 0x80) return result + 1;
// U+0080..U+07FF
else if (ch < 0x800) return result + 2;
// U+0800..U+FFFF
else return result + 3;
}

The documentation for this struct was generated from the following file:

- pugixml.cpp