Pergunta de entrevista da empresa X

Generic string modification questions, split them, modify them, dice them up