Jeff Leal wrote:
That converts and integer to Hex, I need to convert a Hex String to an
integer

yeah, looks like there's no prebuilt function to do it.


out of curiosity I wrote this, so here it is in case you're haven't written your own yet. didn't test it at all so better check that it's giving right answers if you use it.

int32_t htoi( const char *h )
{
        int32_t i = 0;

        while ( *h ) {
                i <<= 4;
                if ( TxtCharIsDigit( *h ) )
                        i |= *h & 0x0F;
                else if ( TxtCharIsHex( *h ) )
                        i |= ( *h & 0x07 ) + 9;
                else
                        return i >> 4;
                h++;
        }

        return i;
}

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to