title: How can I convert a String to an Integer or Float in Crystal?
body: <p><strong>In Crystal, how can I convert a <code>String</code> to an <code>Integer</code> or <code>Float</code>?</strong></p>
  <p>Using Python I can simply do the following:</p>
  <pre class="lang-py prettyprint-override"><code>&gt;&gt;&gt; nb = &quot;123&quot;
  &gt;&gt;&gt; int(nb)
  123
  &gt;&gt;&gt; nb = &quot;1.23&quot;
  &gt;&gt;&gt; float(nb)
  1.23
  </code></pre>
  <p>Are there any similar tools in Crystal?</p>