Reverse a string function

Function to reverse a given string