StringTools Namespace Reference

Functions

string genfilename (const string &pref, const string &suff, int nfields, int nxyz)
string lowerCase (const string &s)
double atod (const string &s)
int str2int (string &s)
string int2str (int integer, int size=0, const string spaceStr=" ")
string double2str (double val, int precision)
bool isAlpha (unsigned char c)
int str2int (unsigned char *s)
string trimRight (const string &)
unsigned char getNextNonWs (const string &line, int index=0)
unsigned int getNextNonWsPos (const string &line, int index=0)
string validateDirPath (const string &path)
int cleanstring (string &line)
string newCleanString (string line)
vector< string > tokenize (string str, string delims)
bool findstr (ifstream &fstr, string tag)
bool findstr (ifstream &fstr, string tag, string &outstring)
bool contains (string s1, string s2)
bool iscomment (string s)

Detailed Description

Methoden zur Stringbearbeitung

Author:
Andre Simon

Function Documentation

double StringTools::atod ( const string &  s  ) 
int StringTools::cleanstring ( string &  line  ) 
bool StringTools::contains ( string  s1,
string  s2 
)
string StringTools::double2str ( double  val,
int  precision 
)
bool StringTools::findstr ( ifstream &  fstr,
string  tag,
string &  outstring 
)
bool StringTools::findstr ( ifstream &  fstr,
string  tag 
)
string StringTools::genfilename ( const string &  pref,
const string &  suff,
int  nfields,
int  nxyz 
)
unsigned char StringTools::getNextNonWs ( const string &  line,
int  index = 0 
)

gibt naechsten Character der Zeile zurck, der kein Whitespace ist

gibt naechsten Character der Zeile zurueck, der kein Whitespace ist

unsigned int StringTools::getNextNonWsPos ( const string &  line,
int  index = 0 
)
string StringTools::int2str ( int  integer,
int  size = 0,
const string  spaceStr = " " 
)

gibt integer als String zurueck

gibt integer >=0 als String zurueck, size=Mindestlaenge des ergebnisstrings, Rest wird mit Leerzeichen (spaceStr) aufgefuellt

bool StringTools::isAlpha ( unsigned char  c  ) 

gibt True zurueck, falls c ein Buchstabe ist

gibt true zurueck, falls c eine Ziffer ist gibt True zurueck, falls c ein Buchstabe/Underscore ist

bool StringTools::iscomment ( string  s  ) 
string StringTools::lowerCase ( const string &  s  ) 
Parameters:
s String
Returns:
lowercase string
string StringTools::newCleanString ( string  line  ) 
int StringTools::str2int ( unsigned char *  s  ) 

wandelt String s in Integer um

wandelt char* s in Integer um

int StringTools::str2int ( string &  s  ) 
Parameters:
String 
Returns:
Integer value

wandelt String s in Integer um

vector< string > StringTools::tokenize ( string  str,
string  delims 
)
string StringTools::trimRight ( const string &  value  ) 

gibt TRUE zurueck, wenn c Space oder Tab ist

string StringTools::validateDirPath ( const string &  path  ) 
 All Classes Namespaces Files Functions Variables Defines

Generated on 18 Dec 2016 by  doxygen 1.6.1