Percorrendo strings

Published by Deep Xavier in

Dadas duas strings, repita ciclicamente todos os caracteres da primeira até que ela tenha o mesmo comprimento da segunda.

Exemplos

stringCycling("abc", "hello") ➞ "abcab"

stringCycling("programming", "edabit") ➞ "progra"

stringCycling("the world in me evolves in hers", "i love Tesh, so much so") ➞ "the world in me evolves"

stringCycling("a thing of beauty is a joy forever", "indulge me surely") ➞ "a thing of beauty"

stringCycling("to", "hide") ➞ "toto"

stringCycling("such a feeling coming over me", "top of the world") ➞ "such a feeling c"

Notas

  • Todos os testes incluirão strings válidas.