Add string->int conversion function