Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Hi Guys,

Is there a function supplied in Brew's (1.0+) helper functions that will convert an int64 to / from an ascii string? I haven't been able to find one in my help and forum search. If not what is the quickest method for doing this?

On a side note you can't seem to use SPRINTF or WSPRINTF with an int64 either, you can sort of get around it by using "%ld", (int32)var but it isn't the solution I am looking for. If you try the above without the (int32) it will only take the half of the number (or in the case of the nokia lower numbers will only display zero).

Cheers in advance
- Skavenger

simple way is to split it into two longs, then sprintf it so mask it with 0xffffffff, sprintf, shift it down >>32 sprintf it
or just find a 64bit itoa, but depending on how often you need it the first option is proably cheaper.
edit: not enough f'inf fs

simple way is to split it into two longs, then sprintf it so mask it with 0xffffffff, sprintf, shift it down >>32 sprintf it
or just find a 64bit itoa, but depending on how often you need it the first option is proably cheaper.
edit: not enough f'inf fs