Convert String to int

And i need to have the casted numeric value = 012;

Octal conversion is tricky.

What is it you're trying to do?