Swift_CharacterReader_Utf8Reader
in package
implements
Swift_CharacterReader
Analyzes UTF-8 characters.
Tags
Interfaces, Classes and Traits
- Swift_CharacterReader
- Analyzes characters for a specific character set.
Table of Contents
- $length_map : mixed
- Pre-computed for optimization
- $s_length_map : mixed
- getCharPositions() : int
- Returns the complete character map.
- getInitialByteSize() : int
- Returns the number of bytes which should be read to start each character.
- getMapType() : int
- Returns mapType.
- validateByteSequence() : int
- Returns an integer which specifies how many more bytes to read.
Properties
$length_map
Pre-computed for optimization
private
static mixed
$length_map
= [
// N=0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
// 0x0N
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
// 0x1N
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
// 0x2N
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
// 0x3N
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
// 0x4N
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
// 0x5N
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
// 0x6N
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
// 0x7N
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
// 0x8N
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
// 0x9N
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
// 0xAN
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
// 0xBN
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
// 0xCN
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
// 0xDN
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
3,
// 0xEN
4,
4,
4,
4,
4,
4,
4,
4,
5,
5,
5,
5,
6,
6,
0,
0,
]
$s_length_map
private
static mixed
$s_length_map
= ["