 <p><a href="http://pubs.opengroup.org/onlinepubs/007904975/functions/atoi.html" rel="nofollow"><code>atoi()</code></a> should do what you want to, although a more robust implementation would use <a href="http://pubs.opengroup.org/onlinepubs/007904975/functions/strtol.html" rel="nofollow"><code>strtol()</code></a>.</p>