string reverse example for each programming language