Enumerations | Functions

suplib Namespace Reference

The suplib namespace encompasses all of the functions in the suplib++ library. More...

Enumerations

enum  readopt {
  READ_PHYS = 0x00, READ_LOGICAL = 0x01, STRIP = 0x02, CLEAN = 0x04,
  RAW = 0x08
}
 

Control options for getrecord.

More...

Functions

void colselect (const vector< string > &icolumns, const vector< string > &exact_add, const vector< string > &regex_add, const vector< string > &exact_del, const vector< string > &regex_del, vector< string > &ocolumns) throw ( Exception )
 select columns based on exact/regex matching/exclusion.
bool match (const string &str, const string &pattern) throw ( Exception )
 handles Perl regular expression matching.
istream & getrecord (istream &is, string &str, int opt=READ_PHYS, char delim='\n', char continuation='\\')
 Reads physical and logical lines.
string & trim (string &str)
 remove leading white space from a string
string & prune (string &str)
 remove leading and trailing white space from a string
bool iscomment (const string &str, const string &ignore=" \t", const string &comment="#")
 determine if the string is a comment.
float str2f (const char *txt) throw ( Exception )
 convert string to floating-point number
double str2d (const char *txt) throw ( Exception )
 convert string to double-precision number
int str2i (const char *txt, int base=10) throw ( Exception )
 convert string to integer number
long str2l (const char *txt, int base=10) throw ( Exception )
 convert string to long number
unsigned long str2ul (const char *txt, int base=10) throw ( Exception )
 convert string to long number
template<typename Container >
void tok (Container &container, string const &in, const char *const delimiters=" \t\n", bool skip=true)
 split a string into tokens

Detailed Description

The suplib namespace encompasses all of the functions in the suplib++ library.