STFINV library: seek source wavelet correction filter

◆ clipstring()

std::string stfinv::tools::clipstring ( std::string &  s,
const std::string &  delim = ":" 
)

strip substring

Strips off first substring up to given delimiter. The string is passed as a reference and will be modified (i.e. the stripped substring as well as the delimiter will be erased).

Parameters
sinput string
delimdelimiter to look for
Returns
first part of string up to delimiter

Definition at line 42 of file parameterhandler.cc.

Referenced by stfinv::STFEngine::initialize(), main(), makeparamap(), and stfinv::STFBaseEngine::parseparameters().

43 {
44  std::string::size_type i=s.find(delim);
45  std::string result;
46  if ((i>=0) && (i<s.length())) {
47  result=s.substr(0,i);
48  s.erase(0,i+delim.length());
49  } else {
50  result=s;
51  s.erase();
52  }
53  return(result);
54 } // std::string stfinv::tools::clipstring()
Here is the caller graph for this function: