Doubt in covertToInt()

olease explaint the for loop
why we are doing (s[i]-‘0)’ *p

s[i]-‘0’ must be to convert digit to character format to its integer equivalent.
Say if s[i]=‘1’
Acii value of ‘1’ is 49 and ascii value of ‘0’ is 48.
So ‘1’-‘0’= 1 (in integer)
However i have not watched the lecture video. If your doubt is not clear then please mention the timestamp so that i can check.