Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ConvertWithLeftOverByte() [2/2]

unsafe int System.Text.DecoderDBCS.ConvertWithLeftOverByte ( byte * bytes,
int count,
char * chars,
int charCount )
inlineprivate

Definition at line 74 of file DecoderDBCS.cs.

75 {
76 byte* ptr = stackalloc byte[2];
77 *ptr = _leftOverLeadByte;
78 int num = 0;
79 if (count > 0)
80 {
81 ptr[1] = *bytes;
82 num++;
83 }
84 int num2 = OSEncoding.MultiByteToWideChar(_encoding.CodePage, ptr, num + 1, chars, charCount);
85 if (count - num > 0)
86 {
87 num2 += OSEncoding.MultiByteToWideChar(_encoding.CodePage, bytes + num, count - num, (chars == null) ? null : (chars + num2), (chars != null) ? (charCount - num2) : 0);
88 }
89 return num2;
90 }
readonly Encoding _encoding
Definition DecoderDBCS.cs:7
virtual int CodePage
Definition Encoding.cs:515

References System.Text.DecoderDBCS._encoding, System.Text.DecoderDBCS._leftOverLeadByte, System.bytes, System.charCount, System.chars, System.Text.Encoding.CodePage, System.count, and System.Text.OSEncoding.MultiByteToWideChar().