OpenMS
Loading...
Searching...
No Matches
StringUtilsHelper Class Reference

#include <OpenMS/DATASTRUCTURES/StringUtils.h>

Static Public Member Functions

static Int32 toInt32 (const std::string &s)
 Parse int32 from string (leading/trailing whitespace allowed)
 
static Int64 toInt64 (const std::string &s)
 Parse int64 from string (leading/trailing whitespace allowed)
 
static float toFloat (const std::string &s)
 Parse float from string (leading/trailing whitespace allowed)
 
static double toDouble (const std::string &s)
 Parse double from string (leading/trailing whitespace allowed)
 
static bool extractDouble (const char *&begin, const char *end, double &target)
 
static bool extractInt (const char *&begin, const char *end, int &target)
 

Member Function Documentation

◆ extractDouble()

static bool extractDouble ( const char *&  begin,
const char *  end,
double &  target 
)
static

Parse a double starting at begin; advances begin on success. Whitespace is NOT consumed. Returns false if no double found.

Referenced by OpenMS::StringUtils::extractDouble(), OpenMS::StringUtils::extractDouble(), and OpenMS::StringUtils::extractDouble().

◆ extractInt()

static bool extractInt ( const char *&  begin,
const char *  end,
int &  target 
)
static

Parse an int starting at begin; advances begin on success. Whitespace is NOT consumed. Returns false if no int found.

Referenced by OpenMS::StringUtils::extractInt(), OpenMS::StringUtils::extractInt(), and OpenMS::StringUtils::extractInt().

◆ toDouble()

static double toDouble ( const std::string &  s)
static

Parse double from string (leading/trailing whitespace allowed)

Referenced by OpenMS::StringUtils::toDouble().

◆ toFloat()

static float toFloat ( const std::string &  s)
static

Parse float from string (leading/trailing whitespace allowed)

Referenced by OpenMS::StringUtils::toFloat().

◆ toInt32()

static Int32 toInt32 ( const std::string &  s)
static

Parse int32 from string (leading/trailing whitespace allowed)

Referenced by OpenMS::StringUtils::toInt32().

◆ toInt64()

static Int64 toInt64 ( const std::string &  s)
static

Parse int64 from string (leading/trailing whitespace allowed)

Referenced by OpenMS::StringUtils::toInt64().