omni::stold

Defined in omni/String.h

long double omni::stold(const string &str, std::size_t *pos = nullptr)

Interprets the string str as a floating point value.

Parameters
  • str – The string to convert.

  • pos – Address of an integer to store the number of characters processed.

Throws
  • std::invalid_argument – If no conversion could be performed.

  • std::out_of_range – If the converted value would fall out of the range of the result type or if the underlying function (std::strtold) sets errno to ERANGE.

Returns

Floating point value corresponding to the contents of str.