MCPcopy Create free account
hub / github.com/bytedance/dplm / Trim

Function Trim

analysis/TMscore.cpp:2575–2583  ·  view source on GitHub ↗

strip white space at the begining or end of string */

Source from the content-addressed store, hash-verified

2573
2574/* strip white space at the begining or end of string */
2575string Trim(const string &inputString)
2576{
2577 string result = inputString;
2578 int idxBegin = inputString.find_first_not_of(" \n\r\t");
2579 int idxEnd = inputString.find_last_not_of(" \n\r\t");
2580 if (idxBegin >= 0 && idxEnd >= 0)
2581 result = inputString.substr(idxBegin, idxEnd + 1 - idxBegin);
2582 return result;
2583}
2584size_t get_PDB_lines(const string filename,
2585 vector<vector<string> >&PDB_lines, vector<string> &chainID_list,
2586 vector<int> &mol_vec, const int ter_opt, const int infmt_opt,

Callers 2

get_PDB_linesFunction · 0.70
file2chainlistFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected