#include <vector>
#include <sstream>
#include <fstream>
#include <iterator>
#include <algorithm>
#include <chrono>
#include <complex>
- Author
- Bernard Heymann
- Date
- 20160911 - 20220101
◆ _STRINGUTIL_
◆ base()
string base |
( |
string & |
filename | ) |
|
◆ check_for_number()
bool check_for_number |
( |
string & |
s | ) |
|
◆ check_for_type()
int check_for_type |
( |
string & |
s | ) |
|
◆ command_line()
string command_line |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
◆ concatenate() [1/3]
string concatenate |
( |
const vector< double > & |
v | ) |
|
Concatenates a vector of real values into a comma-separated array.
- Parameters
-
- Returns
- string concatenated strings.
◆ concatenate() [2/3]
string concatenate |
( |
const vector< long > & |
v | ) |
|
Concatenates a vector of integers into a comma-separated array.
- Parameters
-
- Returns
- string concatenated strings.
◆ concatenate() [3/3]
string concatenate |
( |
const vector< string > & |
vs | ) |
|
Concatenates a vector of strings.
- Parameters
-
- Returns
- string concatenated strings.
◆ extension()
string extension |
( |
string |
filename | ) |
|
◆ get_clean_line()
string get_clean_line |
( |
ifstream & |
fstar | ) |
|
◆ insert() [1/2]
string insert |
( |
string & |
filename, |
|
|
int |
i, |
|
|
int |
n |
|
) |
| |
◆ insert() [2/2]
string insert |
( |
string & |
filename, |
|
|
string |
ins |
|
) |
| |
◆ local_time()
◆ parameter_file_path()
string parameter_file_path |
( |
string & |
filename | ) |
|
Finds the parameter file path.
- Parameters
-
&filename | the parameter filename. |
- Returns
- Bstring the full path and file name.
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.
◆ parse_integer_vector()
vector< long > parse_integer_vector |
( |
string |
vecstr | ) |
|
Parses a comma-separated array of integers into a vector.
- Parameters
-
- Returns
- vector<long> vector of integers.
◆ parse_real_vector()
vector< double > parse_real_vector |
( |
string |
vecstr | ) |
|
Parses a comma-separated array of real values into a vector.
- Parameters
-
- Returns
- vector<double> vector of real values.
◆ quote_or_not()
string quote_or_not |
( |
const string & |
s | ) |
|
◆ remove_spaces()
void remove_spaces |
( |
string & |
s | ) |
|
◆ remove_spaces2()
string remove_spaces2 |
( |
string & |
s | ) |
|
◆ replace_extension()
string replace_extension |
( |
string & |
filename, |
|
|
string |
ext |
|
) |
| |
◆ split() [1/2]
vector< string > split |
( |
const string & |
s | ) |
|
Splits a string on whitespace.
- Parameters
-
- Returns
- vector<string> vector of strings.
◆ split() [2/2]
vector< string > split |
( |
const string & |
s, |
|
|
char |
delim |
|
) |
| |
Splits a string using a given delimiter.
- Parameters
-
&s | string to be split. |
delim | delimiter. |
- Returns
- vector<string> vector of strings.
◆ splitn()
vector< string > splitn |
( |
const string & |
s, |
|
|
long |
n |
|
) |
| |
Splits a string on whitespace.
- Parameters
-
&s | string to be split. |
n | number of strings to expect. |
- Returns
- vector<string> vector of strings.
Keeps whitespace within quoted strings intact.
Excess beyond n strings is discarded.
◆ to_integer()
long to_integer |
( |
string |
s | ) |
|
◆ to_real()
double to_real |
( |
string |
s | ) |
|