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

◆ BreakText()

int System.Xml.XmlUTF8TextReader.BreakText ( byte[] buffer,
int offset,
int length )
inlineprivate

Definition at line 754 of file XmlUTF8TextReader.cs.

755 {
756 if (length > 0 && (buffer[offset + length - 1] & 0x80) == 128)
757 {
758 int num = length;
759 do
760 {
761 length--;
762 }
763 while (length > 0 && (buffer[offset + length] & 0xC0) != 192);
764 if (length == 0)
765 {
766 return num;
767 }
768 byte b = (byte)(buffer[offset + length] << 2);
769 int num2 = 2;
770 while ((b & 0x80) == 128)
771 {
772 b <<= 1;
773 num2++;
774 if (num2 > 4)
775 {
776 return num;
777 }
778 }
779 if (length + num2 == num)
780 {
781 return num;
782 }
783 }
784 return length;
785 }

References System.buffer, System.Xml.Dictionary, System.length, and System.offset.

Referenced by System.Xml.XmlUTF8TextReader.ReadText(), and System.Xml.XmlUTF8TextReader.ReadWhitespace().