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

◆ GetNextUnicodeScalarValueFromUtf16Surrogate()

static int System.Net.WebUtility.GetNextUnicodeScalarValueFromUtf16Surrogate ( ReadOnlySpan< char > input,
ref int index )
inlinestaticprivate

Definition at line 862 of file WebUtility.cs.

863 {
864 if (input.Length - index <= 1)
865 {
866 return 65533;
867 }
868 char c = input[index];
869 char c2 = input[index + 1];
870 if (!char.IsSurrogatePair(c, c2))
871 {
872 return 65533;
873 }
874 index++;
875 return (c - 55296) * 1024 + (c2 - 56320) + 65536;
876 }

References System.index, and System.input.

Referenced by System.Net.WebUtility.HtmlEncode().