Convert string to int. String format routine