string to int help?

How do you convert a string to an int (like "842" would become 842), and how would you check if a string can be converted to an int like that?
Topic archived. No new replies allowed.