TF++, Miscellaneous classes and modules in C++:

◆ strip_string()

std::string tfxx::string::strip_string ( std::string &  s,
const char &  delim 
)

strip substring

Parameters
ccharacter to find in string
delimdelimiter to look for
Returns
number of c characters in string

Definition at line 120 of file stringfunc.cc.

121  {
122  std::string::size_type i=s.find(delim);
123  std::string result;
124  if ((i>=0) && (i<s.size())) {
125  result=s.substr(0,i);
126  s.erase(0,i+1);
127  } else {
128  result=s;
129  s.erase();
130  }
131  return(result);
132  }