Haskell, 67 bytes
n('9':x)='0':n x n(c:x)=succ c:x n""="0" f x=reverse$iterate n""!!x this solution basically adds 1 the given number of times, in shortlex notation.
usage:
>f 9 "8" >f 100 "89" n('9':x)='0':n x n(c:x)=succ c:x n""="0" f x=reverse$iterate n""!!x this solution basically adds 1 the given number of times, in shortlex notation.
usage:
>f 9 "8" >f 100 "89"