Fast ascii block to integer
<p>Is there any command in stl that converts ascii data to the integer form of its hex representation? such as: "abc" -> 0x616263.</p>

<p>i have the most basic way i can think of: </p>

<pre><code>uint64_t tointeger(std::string){
    std::string str = "abc";
    uint64_t value = 0;                  // allow max of 8 chars
    for(int x = 0; x &lt; str.size(); x++)
        value = (value &lt;&lt; 8) + str[x];
    return value;
}
</code></pre>

<p>as stated above: <code>tointeger("abc");</code> returns the value <code>0x616263</code></p>

<p>but this is too slow. and because i have to use this function hundreds of thousands of times, it has slowed down my program significantly. there are 4 or 5 functions that rely on this one, and each of those are called thousands of times, in addition to this function being called thousands of times</p>

<p>what is a faster way to do this?</p>
