Function cras::parseUInt32(const std::string&, uint8_t)
Defined in File string_utils.hpp
Function Documentation
-
uint32_t cras::parseUInt32(const std::string &string, uint8_t base)
Parse the given string to a 32-bit unsigned 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 32-bit uint value or if there are excess characters other than whitespace.
- Returns:
The corresponding 32-bit uint value.