PDA

View Full Version : converting a string to its 64 bit equivalent




MACaveli7
Oct 27, 2010, 03:12 AM
I'm trying to find the mac equivalent of _strtoui64, it's a windows function that takes a string of numbers and converts its 64 bit equivalent, for example the string "18446744073709551615" will be converted to 18446744073709551615.



MACaveli7
Oct 27, 2010, 04:22 AM
ah, the mac version seems to be strtoull.

ianray
Oct 27, 2010, 05:10 AM
ah, the mac version seems to be strtoull.

Sorry to nit-pick, but strtoull is an ISO standard: http://www.opengroup.org/onlinepubs/000095399/functions/strtoul.html. (_strtoui64 seems to be Microsoft's own invention.)