/// <summary>
/// 回文
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public static bool IsPalindrome(string input)
{
if (input == "")
throw new Exception("The input is empty!");
if (input == null)
throw new Exception("The input is null!");
for (int i = 0; i < input.Length/2; i++)
{
if (input[i] != input[input.Length - i - 1])
{
return false;
}
}
return true;
}