Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6ISafeString::atollEx ( const P6CHAR pString,
P6SIZE  cchMax,
P6INT64 pRetLongLong,
P6CHAR **  ppEndPtr 
)
pure virtual

This method is an enhanced version of atoll() used to convert an ascii number string string into an P6R::P6INT64.

It wil automatically detect base 8, base 10 and base 16 number strings. Base 10 strings have the form "12345" with no leading zero's. Base 16 numbers have the form "0x123abc", and base 8 numbers have the form "033" (they must have a leading zero). It will skip leading whitespace, and stop processing at the first non-digit character it finds in the string (including '\0').

Parameters
pString[ in ] A pointer to the string to be converted.
cchMax[ in ] The maximum number of charaters to scan. For example, if the string is contained in a 16 byte buffer, this should be 16 to prevent scanning past the end of the buffer if the string is malformed (not NULL terminated).
pRetLongLong[ out ] The address of a P6R::P6INT64 in which to place the converted result.
ppEndPtr[ out ] The address of a P6CHAR in which to place a pointer to the ending position in pString.
Returns
SuccessP6R::eOk 
FailureP6R::eInvalidArgpString or pRetLong is NULL, or ccMax is zero
P6R::eTooBigcchMax characters was reached in the conversion. The conversion was aborted.