Function cras::parseInt64(const char *, const uint8_t)

Function Documentation

inline int64_t cras::parseInt64(const char *string, const uint8_t base)

Parse the given string to a 64-bit int.

Note

This function does not support any prefixes.

Parameters:
  • string[in] The string to parse.

  • base[in] The numerical base (radix).

Throws:

std::invalid_argument – If the string does not represent a 64-bit int value or if there are excess characters other than whitespace.

Returns:

The corresponding 64-bit int value.