Thoughtworks Interview Question

Code to get substring of a string