| Bsoft 2.0.5 Bernard's software package

string_util.h
Go to the documentation of this file.
1
9 #ifndef _STRINGUTIL_
10
11 #include <vector>
12 #include <sstream>
13 #include <iterator>
14 #include <algorithm>
15 #include <chrono>
16 #include <complex>
17
18 using namespace std;
19
20 // Function prototypes
21 string command_line(int argc, char** argv);
22 string base(string& filename);
23 string extension(string filename);
24 string replace_extension(string& filename, string ext);
25 string insert(string& filename, string ins);
26 string parameter_file_path(string& filename);
27
33 vector<string> split(const string &s);
34
41 vector<string> split(const string &s, char delim);
42
43 vector<long> parse_integer_vector(string vecstr);
44
45 vector<double> parse_real_vector(string vecstr);
46
47 string local_time();
48
49 template <typename T>
50 bool isfinite(complex<T>& value);
51
52 #define _STRINGUTIL_
53 #endif
extension
string extension(string filename)
Definition: string_util.cpp:32
insert
string insert(string &filename, string ins)
Definition: string_util.cpp:48
parameter_file_path
string parameter_file_path(string &filename)
Finds the parameter file path.
Definition: string_util.cpp:69
isfinite
bool isfinite(complex< T > &value)
base
string base(string &filename)
Definition: string_util.cpp:28
replace_extension
string replace_extension(string &filename, string ext)
Definition: string_util.cpp:41
parse_integer_vector
vector< long > parse_integer_vector(string vecstr)
Definition: string_util.cpp:119
split
vector< string > split(const string &s)
Splits a string on whitespace.
Definition: string_util.cpp:92
command_line
string command_line(int argc, char **argv)
Definition: string_util.cpp:16
local_time
string local_time()
Definition: string_util.cpp:143
parse_real_vector
vector< double > parse_real_vector(string vecstr)
Definition: string_util.cpp:131