Strtoull
Syntax
int strtoull(char s[], qword& result);
int strtoull(char s[], dword startIndex, qword& result);
Function
Converts the stringsto an unsigned 64bit integer.The number base is Whitespace (spaces or tabs) at the start of the string is ignored.
Parameters
s String to be converted.
result Contains the converted value after the call. The value is 0 if the string can’t be converted to a number. It is the largest possible positive/negative number in case of overflow.
startIndex Position in s where the conversion shall begin.
Return Values
-2: Ifsis empty orstartIndexis larger thanstrlen(s).
-1: An overflow occurs.
Otherwise, returns the index of the first character after the number.
char s[20] = "123 0xFF";qword number1, number2;int res;res = strtoull(s, number1);write("number1: %I64u, res: %d", number1, res); // output: number1: 123, res: 3res = strtoull(s, res, number2);write("number2: %I64u, res: %d", number2, res); // output: number2: 255, res: 8