Function string_utilities::toFloat

Function Documentation

bool string_utilities::toFloat(const std::string &string, float &value)

Interprets the contents of “string” as a floating point number of type float.

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 float variable that should be overwritten by the floating point number found in “string”

Returns:

True if all went fine, false if not