reverse the digits in a string.