I can't get my function to return the reversed string. I keep getting the original string, plus the reversed sting attached together.
P.S this is obviously a question from someone new. Cut me some slack and save me from the horribly demoralizing down vote.
int i;
reverse = reverse.replaceAll("[^a-zA-Z]+", "").toLowerCase();
for (i = reverse.length() - 1; i >= 0; i--) {
reverse = reverse + reverse.charAt(i);
}
return reverse;
}