Function string_utilities::toUInt32

Function Documentation

bool string_utilities::toUInt32(const std::string &string, uint32_t &value, int32_t base = 10)

Interprets the contents of “string” as a floating point number of whatever unsigned integer type your system has that is exactly 32 bits.

It stores the “string“‘s value in “value” and returns whether or not all went well.

Parameters:
  • string[in] The string whose content should be interpreted as a floating point number

  • value[out] The uint32_t variable that should be overwritten by the floating point number found in “string”

  • base[in] The conversion assumes this base, here: decimal

Returns:

True if all went fine, false if not