#include <OpenMS/DATASTRUCTURES/StringUtils.h>
|
| static Int | toInt32 (const String &this_s) |
| | Functions.
|
| |
| 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
|
| |
| template<typename IteratorT > |
| static bool | extractDouble (IteratorT &begin, const IteratorT &end, double &target) |
| |
| template<typename IteratorT > |
| static bool | extractInt (IteratorT &begin, const IteratorT &end, int &target) |
| |
◆ extractDouble()
template<typename IteratorT >
| static bool extractDouble |
( |
IteratorT & |
begin, |
|
|
const IteratorT & |
end, |
|
|
double & |
target |
|
) |
| |
|
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().
◆ extractInt()
template<typename IteratorT >
| static bool extractInt |
( |
IteratorT & |
begin, |
|
|
const IteratorT & |
end, |
|
|
int & |
target |
|
) |
| |
|
inlinestatic |
Reads an int 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::extractInt().
◆ toDouble()
| static double toDouble |
( |
const String & |
s | ) |
|
|
inlinestatic |
convert String (leading and trailing whitespace allowed) to double
s Input string which represents a double, e.g. " 12.3 "
- Returns
- A double representation of
s
- Exceptions
-
Referenced by OpenMS::StringUtils::toDouble().
◆ toFloat()
| static float toFloat |
( |
const String & |
this_s | ) |
|
|
inlinestatic |
◆ toInt32()
◆ toInt64()
◆ parse_double_
◆ parse_float_
◆ parse_int_
| boost::spirit::qi::int_parser parse_int_ |
|
staticprivate |