Pergunta de entrevista da empresa Keytree

Selecting a few characters from a given string.