516 unsigned short *_Pstate = (
unsigned short *)&
_State;
520 for (; _Mid1 != _Last1 && _Mid2 != _Last2; )
522 unsigned char _By = (
unsigned char)*_Mid1;
528 else if (_By < 0x80 || 0xc0 <= _By)
533 *_Mid2++ = (_Elem)(*_Pstate | (_By & 0x3f));
539 _Ch = _By, _Nextra = 0;
546 _Ch = _By & 0x1f, _Nextra = 1;
548 _Ch = _By & 0x0f, _Nextra = 2;
550 _Ch = _By & 0x07, _Nextra = 3;
552 _Ch = _By & 0x03, _Nextra = _By < 0xfc ? 4 : 5;
554 _Nskip = _Nextra < 3 ? 0 : 1;
559 else if (_Last1 - _Mid1 < _Nextra + 1 - _Nskip)
562 for (++_Mid1; _Nskip < _Nextra; --_Nextra, ++_Mid1)
563 if ((_By = (
unsigned char)*_Mid1) < 0x80 || 0xc0 <= _By)
566 _Ch = _Ch << 6 | (_By & 0x3f);
570 if ((_Mymax < 0x10ffff ? _Mymax : 0x10ffff) <
_Ch)
572 else if (0xffff < _Ch)
574 unsigned short _Ch0 =
575 (
unsigned short)(0xd800 | (_Ch >> 10) - 0x0040);
577 *_Mid2++ = (_Elem)_Ch0;
578 *_Pstate = (
unsigned short)(0xdc00 | (_Ch & 0x03ff));
584 else if (_Mid1 == _Last1)
589 else if ((_By = (
unsigned char)*_Mid1++) < 0x80 || 0xc0 <= _By)
601 _First2, _Last2, _Mid2);
612 *_Mid2++ = (_Elem)_Ch;
virtual result __CLR_OR_THIS_CALL do_in(_Statype &_State, const _Byte *_First1, const _Byte *_Last1, const _Byte *&_Mid1, _Elem *_First2, _Elem *_Last2, _Elem *&_Mid2) const
Definition: codecvt:512
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
_In_ size_t _Deref_pre_opt_z_ char const _In_ size_t _Inout_ mbstate_t * _State
Definition: wchar.h:78
unsigned char
Definition: mbstring.h:107
_Mybase::result result
Definition: codecvt:493