Strig to Integer function