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

◆ HexUnescape()

static char System.Uri.HexUnescape ( string pattern,
ref int index )
inlinestatic

Definition at line 1045 of file Uri.cs.

1046 {
1047 if (index < 0 || index >= pattern.Length)
1048 {
1049 throw new ArgumentOutOfRangeException("index");
1050 }
1051 if (pattern[index] == '%' && pattern.Length - index >= 3)
1052 {
1053 char c = UriHelper.DecodeHexChars(pattern[index + 1], pattern[index + 2]);
1054 if (c != '\uffff')
1055 {
1056 index += 3;
1057 return c;
1058 }
1059 }
1060 return pattern[index++];
1061 }

References System.UriHelper.DecodeHexChars(), and System.index.

Referenced by System.Net.Http.Headers.ContentDispositionHeaderValue.TryDecode5987().