Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function atoi(text)
- output = 0
- for i = 0, string.len(text)-1 do
- power = math.pow(10, string.len(text)-1-i)
- actualNumber = string.byte(text,i+1)-48
- output = output + actualNumber*power
- end
- return output
- end
Advertisement
Add Comment
Please, Sign In to add comment