title: How do I convert string of hex digits to value it represents in Lua
body: <p>I'm reading in a lot of lines of hex data. They come in as strings and I parse them for line_codes which tell me what to do with the rest of the data. One line sets a most significant word of an address (MSW), another line sets the least significant (LSW).</p>
  
  <p>I then need to concatenate those together such that if MSW = "00ff" and LSW = "f10a"
  address would be 00fff10a.</p>
  
  <p>This all went fine, but then I was supposed to check if address was between a certain set of values: </p>
  
  <pre><code>if address &lt;= "007FFFh" and address &gt;= "000200h" then
      print "I'm in"
  end
  </code></pre>
  
  <p>As you all probably know, Lua is not a fan of this as it gives me an error using <code>&lt;=</code> and <code>&gt;=</code> with strings.</p>
  
  <p>If there a way I can convert the string into hex, such that "FFFF" would become 0xFFFF?</p>