Logo Search packages:      
Sourcecode: pwlib version File versions

DWORD PString::AsUnsigned ( unsigned  base = 10  )  const [inherited]

Convert the string to an integer value using the specified number base. All characters up to the first illegal character for the number base are converted. Case is not significant for bases greater than 10.

The number base may only be from 2 to 36 and the function will assert if it is not in this range.

This function uses the standard C library strtoul()# function.

Returns:
integer value for the string.
Parameters:
base  Number base to convert the string in.

Definition at line 2278 of file contain.cxx.

Referenced by PSocket::GetPortByService(), and PIpAccessControlEntry::Parse().

{
  PAssert(base >= 2 && base <= 36, PInvalidParameter);
  char * dummy;
  return strtoul(theArray, &dummy, base);
}


Generated by  Doxygen 1.6.0   Back to index