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

◆ GetEscapedChars()

int System.Xml.XmlBufferReader.GetEscapedChars ( int offset,
int length,
char[] chars )
inline

Definition at line 623 of file XmlBufferReader.cs.

624 {
625 byte[] buffer = _buffer;
626 int num = 0;
627 int num2 = offset;
628 int num3 = offset + length;
629 while (true)
630 {
632 {
633 offset++;
634 continue;
635 }
636 num += GetChars(num2, offset - num2, chars, num);
637 if (offset == num3)
638 {
639 break;
640 }
641 num2 = offset;
642 if (buffer[offset] == 38)
643 {
644 while (offset < num3 && buffer[offset] != 59)
645 {
646 offset++;
647 }
648 offset++;
650 num2 = offset;
651 if (charEntity > 65535)
652 {
654 chars[num++] = surrogateChar.HighChar;
655 chars[num++] = surrogateChar.LowChar;
656 }
657 else
658 {
659 chars[num++] = (char)charEntity;
660 }
661 }
662 else if (buffer[offset] == 10 || buffer[offset] == 9)
663 {
664 chars[num++] = ' ';
665 offset++;
666 num2 = offset;
667 }
668 else
669 {
670 chars[num++] = ' ';
671 offset++;
672 if (offset < num3 && buffer[offset] == 10)
673 {
674 offset++;
675 }
676 num2 = offset;
677 }
678 }
679 return num;
680 }
int GetCharEntity(int offset, int length)
int GetChars(int offset, int length, char[] chars)

References System.Xml.XmlBufferReader._buffer, System.buffer, System.chars, System.Xml.XmlBufferReader.GetCharEntity(), System.Xml.XmlBufferReader.GetChars(), System.Xml.XmlBufferReader.IsAttrChar(), System.length, and System.offset.

Referenced by System.Xml.XmlBufferReader.GetEscapedString().