Functions | |
bool | suplib::iscomment (const string &str, const string &ignore, const string &comment) |
determine if the string is a comment. | |
string & | suplib::prune (string &str) |
remove leading and trailing white space from a string | |
double | suplib::str2d (const char *txt) throw ( Exception ) |
convert string to double-precision number | |
float | suplib::str2f (const char *txt) throw ( Exception ) |
convert string to floating-point number | |
int | suplib::str2i (const char *txt, int base) throw ( Exception ) |
convert string to integer number | |
long | suplib::str2l (const char *txt, int base) throw ( Exception ) |
convert string to long number | |
unsigned long | suplib::str2ul (const char *txt, int base) throw ( Exception ) |
convert string to long number | |
string & | suplib::trim (string &str) |
remove leading white space from a string | |
template<typename Container> | |
void | suplib::tok (Container &container, string const &in, const char *const delimiters=" \t\n", bool skip=true) |
split a string into tokens |
bool suplib::iscomment | ( | const string & | str, | |
const string & | ignore, | |||
const string & | comment | |||
) |
determine if the string is a comment.
str | the string upon which to operate |
Definition at line 48 of file iscomment.cc.
string & suplib::prune | ( | string & | str | ) |
remove leading and trailing white space from a string
str | the string upon which to operate |
double suplib::str2d | ( | const char * | txt | ) | throw ( Exception ) |
convert string to double-precision number
txt | the string upon which to operate |
float suplib::str2f | ( | const char * | txt | ) | throw ( Exception ) |
convert string to floating-point number
txt | the string upon which to operate |
int suplib::str2i | ( | const char * | txt, | |
int | base | |||
) | throw ( Exception ) |
convert string to integer number
txt | the string upon which to operate |
long suplib::str2l | ( | const char * | txt, | |
int | base | |||
) | throw ( Exception ) |
convert string to long number
txt | the string upon which to operate |
unsigned long suplib::str2ul | ( | const char * | txt, | |
int | base | |||
) | throw ( Exception ) |
convert string to long number
txt | the string upon which to operate |
template< typename Container > void suplib::tok | ( | Container & | container, | |
string const & | in, | |||
const char *const | delimiters = " \t\n" , |
|||
bool | skip = true | |||
) | [inline] |
split a string into tokens
container | the reference to a C++ container object into which the parsed string goes. | |
in | the string to parse. | |
delimiters | the characters which delimit tokens. | |
skip | consecutive delimiters are skipped. |
string & suplib::trim | ( | string & | str | ) |