Recorriendo cadenas de texto

Published by Deep Xavier in

Dadas dos cadenas, recorre cíclicamente todos los caracteres de la primera hasta que tenga la misma longitud que la segunda.

Ejemplos

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

  • Todas las pruebas incluirán cadenas válidas.