How to convert string into number using recursion?

what are the various function calls to convert the string into a number

@rohitkandpal683
I convert s[1:n-1], s[n] to integers and combine them
s[1:n-1] * 10 + s[n]