GEMC  2.3
Geant4 Monte-Carlo Framework
Functions
string_utilities.cc File Reference
#include "string_utilities.h"
#include <algorithm>
#include "CLHEP/Units/PhysicalConstants.h"
+ Include dependency graph for string_utilities.cc:

Go to the source code of this file.

Functions

vector< string > get_info (string input, string chars)
 get information from strings such as "5*GeV, 2*deg, 10*deg", parses out strings in second argument More...
 
vector< string > get_info (string input)
 get information from strings such as "5*GeV, 2*deg, 10*deg", parses out parenthesis, commas, quotes More...
 
string TrimSpaces (string in)
 Removes leading and trailing spaces. More...
 
vector< string > get_strings (string input)
 returns a vector of strings from a stringstream, space is delimiter More...
 
vector< string > get_strings_except (string input, string ignore)
 returns a vector of strings from a stringstream, space is delimiter, ignore string with second argument More...
 
vector< string > get_strings (string input, string x)
 returns a vector of strings from a stringstream, second string is delimiter More...
 
double scan_number (const char *str)
 
double get_number (string v, int warn_no_unit)
 Returns number with dimension from string, i.e. 100*cm. More...
 
void print_vstring (vector< string > s)
 prints each element of a string vector More...
 
string get_variation (string var)
 parse variation name from string More...
 
bool is_main_variation (string var)
 returns 1 if the string "main:" is found on the input More...
 
ostream & operator<< (ostream &stream, map< string, string > smap)
 overload << for map<string, string> More...
 

Function Documentation

vector<string> get_info ( string  input,
string  chars 
)

Definition at line 13 of file string_utilities.cc.

vector<string> get_info ( string  input)

Definition at line 20 of file string_utilities.cc.

double get_number ( string  v,
int  warn_no_unit 
)

Definition at line 134 of file string_utilities.cc.

vector<string> get_strings ( string  input)

Definition at line 50 of file string_utilities.cc.

vector<string> get_strings ( string  input,
string  x 
)

Definition at line 85 of file string_utilities.cc.

vector<string> get_strings_except ( string  input,
string  ignore 
)

Definition at line 67 of file string_utilities.cc.

string get_variation ( string  var)

Definition at line 192 of file string_utilities.cc.

bool is_main_variation ( string  var)

Definition at line 203 of file string_utilities.cc.

ostream& operator<< ( ostream &  stream,
map< string, string >  smap 
)

Definition at line 214 of file string_utilities.cc.

void print_vstring ( vector< string >  s)

Definition at line 184 of file string_utilities.cc.

double scan_number ( const char *  str)

Definition at line 112 of file string_utilities.cc.

string TrimSpaces ( string  in)

Definition at line 31 of file string_utilities.cc.