![]() |
Bsoft 2.1.4
Bernard's software package
|
Functions | |
string | command_line (int argc, char **argv) |
string | base (string &filename) |
string | extension (string filename) |
string | replace_extension (string &filename, string ext) |
string | insert (string &filename, string ins) |
string | insert (string &filename, int i, int n) |
void | remove_spaces (string &s) |
string | remove_spaces2 (string &s) |
string | parameter_file_path (string &filename) |
Finds the parameter file path. More... | |
string | quote_or_not (const string &s) |
vector< string > | split (const string &s) |
Splits a string on whitespace. More... | |
vector< string > | splitn (const string &s, long n) |
Splits a string on whitespace. More... | |
vector< string > | split (const string &s, char delim) |
Splits a string using a given delimiter. More... | |
string | concatenate (const vector< string > &vs) |
Concatenates a vector of strings. More... | |
string | concatenate (const vector< long > &v) |
Concatenates a vector of integers into a comma-separated array. More... | |
string | concatenate (const vector< double > &v) |
Concatenates a vector of real values into a comma-separated array. More... | |
vector< long > | parse_integer_vector (string vecstr) |
Parses a comma-separated array of integers into a vector. More... | |
vector< double > | parse_real_vector (string vecstr) |
Parses a comma-separated array of real values into a vector. More... | |
string | local_time () |
string | get_clean_line (ifstream &fstar) |
long | to_integer (string s) |
double | to_real (string s) |
bool | check_for_number (string &s) |
int | check_for_type (string &s) |
Variables | |
int | verbose |
string base | ( | string & | filename | ) |
bool check_for_number | ( | string & | s | ) |
int check_for_type | ( | string & | s | ) |
string command_line | ( | int | argc, |
char ** | argv | ||
) |
string concatenate | ( | const vector< double > & | v | ) |
Concatenates a vector of real values into a comma-separated array.
&v | vector of real values. |
string concatenate | ( | const vector< long > & | v | ) |
Concatenates a vector of integers into a comma-separated array.
&v | vector of integers. |
string concatenate | ( | const vector< string > & | vs | ) |
Concatenates a vector of strings.
&vs | vector of strings. |
string extension | ( | string | filename | ) |
string get_clean_line | ( | ifstream & | fstar | ) |
string insert | ( | string & | filename, |
int | i, | ||
int | n | ||
) |
string insert | ( | string & | filename, |
string | ins | ||
) |
string local_time | ( | ) |
string parameter_file_path | ( | string & | filename | ) |
Finds the parameter file path.
&filename | the parameter filename. |
The parameter file path should primarily be defined in the environmental variable "BPARAM". Otherwise a default is used which may or may not be valid. The string returned has a length containing the path plus one byte.
vector< long > parse_integer_vector | ( | string | vecstr | ) |
Parses a comma-separated array of integers into a vector.
vecstr | string. |
vector< double > parse_real_vector | ( | string | vecstr | ) |
Parses a comma-separated array of real values into a vector.
vecstr | string. |
string quote_or_not | ( | const string & | s | ) |
void remove_spaces | ( | string & | s | ) |
string remove_spaces2 | ( | string & | s | ) |
string replace_extension | ( | string & | filename, |
string | ext | ||
) |
vector< string > split | ( | const string & | s | ) |
Splits a string on whitespace.
&s | string to be split. |
vector< string > split | ( | const string & | s, |
char | delim | ||
) |
Splits a string using a given delimiter.
&s | string to be split. |
delim | delimiter. |
vector< string > splitn | ( | const string & | s, |
long | n | ||
) |
Splits a string on whitespace.
&s | string to be split. |
n | number of strings to expect. |
Keeps whitespace within quoted strings intact. Excess beyond n strings is discarded.
long to_integer | ( | string | s | ) |
double to_real | ( | string | s | ) |
|
extern |