Convert a string to integer using recursion

convert a string to integer using recursion.can u give me the recursive equation

For recursive solution, you will check if len==1, the u will return str-‘0’, or else
return 10*function(str,len-1)+str[len-1]-‘0’
This is the approach you can follow