Function parsing_utilities::parseInt16(const std::string&, int16_t&, int32_t)

Function Documentation

bool parsing_utilities::parseInt16(const std::string &string, int16_t &value, int32_t base = 10)

Interprets the contents of “string” as a integer number of type int16_t.

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 an integer number

  • value[out] The int16_t variable that should be overwritten by the integer number found in “string”

  • base[in] The numerical base of the integer in the string, default being 10

Returns:

True if all went fine, false if not