Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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 1465 of file pugixml.cc.

Member Typedef Documentation

◆ value_type

typedef size_t utf8_counter::value_type

Definition at line 1467 of file pugixml.cc.

Member Function Documentation

◆ high()

value_type utf8_counter::high ( value_type result,
uint32_t  )
inlinestatic

Definition at line 1479 of file pugixml.cc.

1480 {
1481 // U+10000..U+10FFFF
1482 return result + 4;
1483 }

◆ low()

value_type utf8_counter::low ( value_type result,
uint32_t ch )
inlinestatic

Definition at line 1469 of file pugixml.cc.

1470 {
1471 // U+0000..U+007F
1472 if (ch < 0x80) return result + 1;
1473 // U+0080..U+07FF
1474 else if (ch < 0x800) return result + 2;
1475 // U+0800..U+FFFF
1476 else return result + 3;
1477 }

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