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

◆ UrlDecodeInternal() [1/2]

static byte[] System.Net.WebUtility.UrlDecodeInternal ( byte[] bytes,
int offset,
int count )
inlinestaticprivate

Definition at line 804 of file WebUtility.cs.

805 {
807 {
808 return null;
809 }
810 int num = 0;
811 byte[] array = new byte[count];
812 for (int i = 0; i < count; i++)
813 {
814 int num2 = offset + i;
815 byte b = bytes[num2];
816 switch (b)
817 {
818 case 43:
819 b = 32;
820 break;
821 case 37:
822 if (i < count - 2)
823 {
824 int num3 = HexConverter.FromChar(bytes[num2 + 1]);
825 int num4 = HexConverter.FromChar(bytes[num2 + 2]);
826 if ((num3 | num4) != 255)
827 {
828 b = (byte)((num3 << 4) | num4);
829 i += 2;
830 }
831 }
832 break;
833 }
834 array[num++] = b;
835 }
836 if (num < array.Length)
837 {
838 Array.Resize(ref array, num);
839 }
840 return array;
841 }
static bool ValidateUrlEncodingParameters(byte[] bytes, int offset, int count)

References System.array, System.bytes, System.count, System.HexConverter.FromChar(), System.offset, and System.Net.WebUtility.ValidateUrlEncodingParameters().