DATRW++ library: seismic data I/O with multiple formats

◆ extractstring()

std::string datrw::mseed::util::extractstring ( const char *  s,
const int &  l 
)

Return a maximum of l characters.

Parameters
[in]sinput string (character array)
[in]lmaximum number of characters to return
Returns
string object containing not more than l characters of the input sequence

Definition at line 141 of file mseedread.cc.

Referenced by datrw::mseed::MiniSEEDRecord::channel(), datrw::mseed::SEED::dump(), datrw::mseed::MiniSEEDRecord::location(), datrw::mseed::MiniSEEDRecord::network(), and datrw::mseed::MiniSEEDRecord::station().

142  {
143  int slen=std::strlen(s);
144  slen = slen < 0 ? l : slen;
145  slen = slen < l ? slen : l;
146  return(std::string(s, slen));
147  } // std::string extractstring(const char* s, const int& l)
Here is the caller graph for this function: