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

◆ extractvalue()

void datrw::tfascii::helper::extractvalue ( std::string &  line,
bool  unit = false 
)

split given string

This function will split a line after the following scheme:
number of samples: 1000 m will be converted into:
1000

Parameters
linereference to the line which will be splitted
unitif a value has a unit or not

Definition at line 53 of file readtfascii.cc.

Referenced by datrw::tfascii::readfileheader(), and datrw::tfascii::readtraceheader().

54  {
55  if (unit)
56  {
57  std::string tmp = line.substr(0,line.rfind(" "));
58  line = tmp.substr(tmp.rfind(" ")+1);
59  }
60  else
61  {
62  line = line.substr(line.rfind(" ")+1);
63  }
64  } // function extractvalue
Here is the caller graph for this function: