StringOps Namespace Reference

Some utility functions for manipulating std::strings. More...


template<typename Number >
std::string NumToString (const Number &aNumber)
 Write the number as a String.
std::string ToLower (const std::string &str)
 Convert std::string to lower case.
void split (const std::string &str, char sep, StringMap &words)
void splitDoublet (const std::string &str, std::string &value1, std::string &value2)
 Split a xx.yy std::string into xx and yy.
void parseTextFile (const std::string &fileName, std::map< int, StringMap > &text)
bool hasSubstr (const std::string &name, const std::string &substr)
 Returns true if the given name contains the given substring.

Detailed Description

Some utility functions for manipulating std::strings.

Function Documentation

bool StringOps::hasSubstr ( const std::string &  name,
const std::string &  substr 
template<typename Number >
std::string StringOps::NumToString ( const Number &  aNumber  )  [inline]
void StringOps::parseTextFile ( const std::string &  fileName,
std::map< int, StringMap > &  text 

Gobble up a text file into the map data structure. The words in the file can the be accessed via text[lineNumber][wordNumber]

Referenced by OptionsFiller::parseFileList(), OptionsFiller::parseIllumList(), and OptionsFiller::parseTableList().

void StringOps::split ( const std::string &  str,
char  sep,
StringMap words 

Split the "sentence" std::string into a list of "words" as delimited by the sep character.

Referenced by Table< DataType >::checkRange(), DataMethod< DataType >::determineDetectionSourceAndTarget(), DataMethod< DataType >::determineSourceAndTarget(), and extractSources().

void StringOps::splitDoublet ( const std::string &  str,
std::string &  value1,
std::string &  value2 

Split a xx.yy std::string into xx and yy.

Referenced by insertFitsExtensionHeader(), and insertFitsPrimaryHeader().

std::string StringOps::ToLower ( const std::string &  str  ) 
Generated on Mon Oct 4 10:39:44 2010 for WfcamSrc by  doxygen 1.6.3