52 char *_Pstate = (
char *)&_State;
56 for (; _Mid1 != _Last1 && _Mid2 != _Last2; )
58 unsigned char _By = (
unsigned char)*_Mid1;
63 _Ch = _By, _Nextra = 0;
67 return (_Mybase::error);
70 _Ch = _By & 0x1f, _Nextra = 1;
72 _Ch = _By & 0x0f, _Nextra = 2;
74 _Ch = _By & 0x07, _Nextra = 3;
76 _Ch = _By & 0x03, _Nextra = _By < 0xfc ? 4 : 5;
80 else if (_Last1 - _Mid1 < _Nextra + 1)
83 for (++_Mid1; 0 < _Nextra; --_Nextra, ++_Mid1)
84 if ((_By = (
unsigned char)*_Mid1) < 0x80 || 0xc0 <= _By)
85 return (_Mybase::error);
87 _Ch = _Ch << 6 | (_By & 0x3f);
96 _First2, _Last2, _Mid2);
98 if (_Ans == _Mybase::partial)
108 return (_Mybase::error);
109 *_Mid2++ = (_Elem)_Ch;
112 return (_First1 == _Mid1 ? _Mybase::partial : _Mybase::ok);
_Mybase::result result
Definition: utf8:32
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
virtual result do_in(_Statype &_State, const _Byte *_First1, const _Byte *_Last1, const _Byte *&_Mid1, _Elem *_First2, _Elem *_Last2, _Elem *&_Mid2) const
Definition: utf8:48