Struct UTF16LEDecoder
UTF-16 LE decoder to use with dlib.text.encodings.transcode
Fields
Name | Type | Description |
character
|
int | Current character index
|
index
|
ulong | Current index in an input string
|
input
|
string | Input string. Set it before decoding
|
Methods
Name | Description |
decode
()
|
Range interface.
|
decodeNext
()
|
Decode next character.
|
eos
()
|
Check if decoder is in the end of input.
|
Example
wstring input = "Жå∑";
auto decoder = UTF16LEDecoder(cast(string)input);
assert(decoder.decodeNext() == 'Ж');
assert(decoder.decodeNext() == 'å');
assert(decoder.decodeNext() == '∑');