Up to 9000

  • FTB will be shutting down this forum by the end of July. To participate in our community discussions, please join our Discord! https://ftb.team/discord

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
1882
if($str==strrev($str)){
echo "palindrome found";
}

Yes, there is a function in php to reverse a string, no I have no idea why you would need one
 

Someone Else 37

Forum Addict
Feb 10, 2013
1,876
1,440
168
1885 Haskell has a function to reverse a list, and since strings are lists of characters, it works on strings, too. It's actually quite handy in certain situations. I think I used it when I was making a function to generate all possible substrings of a given string.
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
1886 well, that reverse a list and thus happens to work on strings as well. This only works on strings.