public bool isPalindrome(String str)
{
if (String.IsNullOrEmpty(str))
return false;
int length = str.Length;
str = str.ToLower();
for (int i = 0; i < (length / 2); i++)
{
if (str[i] != str[length - 1 - i])
return false;
}
return true;
}
This blog is for .NET and related web technology, where you will find some really good and time saving answers which can help you to make your fundaas clear.
Monday, June 4, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment