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

◆ ComputeQuotedTextLengthUntilEndQuote()

static int System.Runtime.Serialization.Json.XmlJsonReader.ComputeQuotedTextLengthUntilEndQuote ( byte[] buffer,
int offset,
int offsetMax,
out bool escaped )
inlinestaticprivate

Definition at line 668 of file XmlJsonReader.cs.

669 {
670 int num = offset;
671 escaped = false;
672 for (; offset < offsetMax; offset++)
673 {
674 byte b = buffer[offset];
675 if (b < 32)
676 {
677 throw new FormatException(System.SR.Format(System.SR.InvalidCharacterEncountered, (char)b));
678 }
679 switch (b)
680 {
681 case 92:
682 case 239:
683 escaped = true;
684 break;
685 default:
686 continue;
687 case 34:
688 break;
689 }
690 break;
691 }
692 return offset - num;
693 }
static string InvalidCharacterEncountered
Definition SR.cs:546
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
Definition SR.cs:7

References System.buffer, System.Runtime.Serialization.Dictionary, System.SR.Format(), System.SR.InvalidCharacterEncountered, and System.offset.

Referenced by System.Runtime.Serialization.Json.XmlJsonReader.ReadQuotedText().