Atlassian interview question

Roll forward a string by 1 digit and repeat it based on digits given in an array