MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / CollapseWS

Function CollapseWS

comp/read_ansys.cpp:39–51  ·  view source on GitHub ↗

collapse internal whitespace to single blanks (for keyword matching)

Source from the content-addressed store, hash-verified

37
38 // collapse internal whitespace to single blanks (for keyword matching)
39 static string CollapseWS (const string & s)
40 {
41 string out;
42 bool inws = false;
43 for (char c : s)
44 {
45 if (c == ' ' || c == '\t') { inws = true; continue; }
46 if (inws && !out.empty()) out += ' ';
47 inws = false;
48 out += c;
49 }
50 return out;
51 }
52
53 static vector<string> SplitComma (const string & line)
54 {

Callers 1

ParseAbaqusInpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected