Function string_utilities::toUInt8

Function Documentation

uint8_t string_utilities::toUInt8(const std::string &string, uint8_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 8 bits.

It stores the “string“‘s value in “value”.

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

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

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

Returns:

The value found in “string”