JS
1function str_reverse(str) {
2 return str.split("").reverse().join("");
3}
PHP
1function str_reverse($str){
2 return implode( array_reverse( str_split($str) ) );
3}
Python
1def str_reverse(string):
2 L = list(string)
3 L.reverse()
4 return ''.join(L)