I'm a school and have no access to a method to get this code home. Can someone please copy/paste this to eyemwing@earthlink.net ?
//Tony Bathgate
//11/06/03
//palindrome.java
//Determines if a given string is a palindrome.
public class palindrome
{
public static void main(String[] args)
{
palindrome palindrome=new palindrome();
palindrome.pal("h.,!;h n jhdj!,.; ");
}
public static void pal(String strA)
{
int len,loop;
String strB=new String();
char ch1;
strA=strA.toLowerCase();
len=strA.length();
loop=0;
while(loop<=(len-1))
{
ch1=strA.charAt(loop);
if (ch1==' ' || ch1=='.' || ch1==',' || ch1=='!' || ch1==';' || ch1==':' || ch1=='?')
{
loop++;
}
else
{
strB=strB+ch1;
loop++;
}
}
}
}
//Tony Bathgate
//11/06/03
//palindrome.java
//Determines if a given string is a palindrome.
public class palindrome
{
public static void main(String[] args)
{
palindrome palindrome=new palindrome();
palindrome.pal("h.,!;h n jhdj!,.; ");
}
public static void pal(String strA)
{
int len,loop;
String strB=new String();
char ch1;
strA=strA.toLowerCase();
len=strA.length();
loop=0;
while(loop<=(len-1))
{
ch1=strA.charAt(loop);
if (ch1==' ' || ch1=='.' || ch1==',' || ch1=='!' || ch1==';' || ch1==':' || ch1=='?')
{
loop++;
}
else
{
strB=strB+ch1;
loop++;
}
}
}
}