using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
namespace HttpUtility_ByYocei
{
class HttpUtility
{
private static int HexToInt(char h)
{
if ((h >= '0') && (h <= '9'))
{
return (h - '0');
}
if ((h >= 'a') && (h <= 'f'))
{
return ((h - 'a') + 10);
}
if ((h >= 'A') && (h <= 'F'))
{
return ((h - 'A') + 10);
}
return -1;
}
private static char IntToHex(int n)
{
if (n <= 9)
{
return (char)(n + 0x30);
}
return (char)((n - 10) + 0x61);
}
private static int StrToInt(byte t)
{
if (t <= 58)
{
return t - 48;
}
else if (t <= 90)
{
return t - 65 + 10;
}
else
{
return t - 97 + 10;
}
}
private static bool IsSafe(char ch)
{
if ((((ch >= 'a') && (ch <= 'z')) || ((ch >= 'A') && (ch <= 'Z'))) || ((ch >= '0') && (ch <= '9')))
{
return true;
}
switch (ch)
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
namespace HttpUtility_ByYocei
{
class HttpUtility
{
private static int HexToInt(char h)
{
if ((h >= '0') && (h <= '9'))
{
return (h - '0');
}
if ((h >= 'a') && (h <= 'f'))
{
return ((h - 'a') + 10);
}
if ((h >= 'A') && (h <= 'F'))
{
return ((h - 'A') + 10);
}
return -1;
}
private static char IntToHex(int n)
{
if (n <= 9)
{
return (char)(n + 0x30);
}
return (char)((n - 10) + 0x61);
}
private static int StrToInt(byte t)
{
if (t <= 58)
{
return t - 48;
}
else if (t <= 90)
{
return t - 65 + 10;
}
else
{
return t - 97 + 10;
}
}
private static bool IsSafe(char ch)
{
if ((((ch >= 'a') && (ch <= 'z')) || ((ch >= 'A') && (ch <= 'Z'))) || ((ch >= '0') && (ch <= '9')))
{
return true;
}
switch (ch)