Pregunta de entrevista de Thoughtworks

Code to get substring of a string