Ruby で作った

str = "1111111111abcde2223333333"

nums = <<"EOT".lines( chomp: true ).map( &:to_i ) # 数字の配列。改行は削除
10
5
3
7
EOT
#=> [10, 5, 3, 7]

i = 0
nums.each do |num|
puts str[ i, num ] # 位置i から、num個の文字列
i += num
end