-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.h
42 lines (22 loc) · 1 KB
/
functions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <string>
#include <vector>
using namespace std;
#ifndef FUNCTIONS_H
#define FUNCTIONS_H
// ---------------------------------------------------------------------
int substr_count(string source, string substring);
// ---------------------------------------------------------------------
string trim(string& str);
// ---------------------------------------------------------------------
void fast_exec(string command);
// ---------------------------------------------------------------------
string exec(string command);
// ---------------------------------------------------------------------
vector<string> explode(string delimiter, string inputstring);
// ---------------------------------------------------------------------
string implode(string delimiter, vector<string> & elements);
// ---------------------------------------------------------------------
bool file_exists(string file_name);
// ---------------------------------------------------------------------
int get_cores_count();
#endif