![]() |
OpenMS
3.0.0
|
#include <OpenMS/DATASTRUCTURES/StringUtils.h>
Classes | |
struct | real_policies_NANfixed_ |
Static Public Member Functions | |
static Int | toInt32 (const String &this_s) |
Functions. More... | |
static Int64 | toInt64 (const String &this_s) |
static float | toFloat (const String &this_s) |
static double | toDouble (const String &s) |
convert String (leading and trailing whitespace allowed) to double More... | |
template<typename IteratorT > | |
static bool | extractDouble (IteratorT &begin, const IteratorT &end, double &target) |
Static Private Attributes | |
static boost::spirit::qi::real_parser< double, real_policies_NANfixed_< double > > | parse_double_ |
static boost::spirit::qi::real_parser< float, real_policies_NANfixed_< float > > | parse_float_ |
|
inlinestatic |
Reads a double from an iterator position. The begin iterator is modified (advanced) if parsing was successful. The target
only contains a valid result if the functions returns true (i.e. parsing succeeded). Whitespaces before and after the double are NOT consumed!
Referenced by OpenMS::StringUtils::extractDouble().
convert String (leading and trailing whitespace allowed) to double
s
Input string which represents a double, e.g. " 12.3 "
s
Exception::ConversionError | if the string is not completely explained by the double (whitespaces are allowed) |
Referenced by OpenMS::StringUtils::toDouble().
Referenced by OpenMS::StringUtils::toFloat().
Functions.
Referenced by OpenMS::StringUtils::toInt32().
Referenced by OpenMS::StringUtils::toInt64().
|
staticprivate |
|
staticprivate |