MCPcopy Create free account
hub / github.com/CoolProp/CoolProp / strjoin

Function strjoin

src/CPstrings.cpp:7–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <string>
6
7std::string strjoin(const std::vector<std::string>& strings, const std::string& delim) {
8 // Empty input vector
9 if (strings.empty()) {
10 return "";
11 }
12
13 std::string output = strings[0];
14 for (unsigned int i = 1; i < strings.size(); i++) {
15 output += format("%s%s", delim.c_str(), strings[i].c_str());
16 }
17 return output;
18}
19
20std::vector<std::string> strsplit(const std::string& s, char del) {
21 std::vector<std::string> v;

Callers 15

get_csv_parameter_listFunction · 0.85
extract_fractionsFunction · 0.85
_PropsSImultiFunction · 0.85
do_satMethod · 0.85
do_satMethod · 0.85
path_to_tablesMethod · 0.85
buildMethod · 0.85
path_to_tablesMethod · 0.85

Calls 2

formatFunction · 0.70
sizeMethod · 0.45

Tested by 2

do_satMethod · 0.68
do_satMethod · 0.68