areas.cpp
/*
  Retrieve string form the head of CSV line, and then delete it's form that
  line.

  @param line
    A refeance to a CSV line

  @return
    std::string

  @example
    std::string line = "give,me,100%,please";
    std::string give = area.getVariableCSV(line);
    //line = "me,100%,please"; - now
*/
Retrieve string form the head of CSV line, and then delete it's form that
line.
Retrieve string form the head of CSV line and then delete it ' s form that line .
std::string Areas::getVariableCSV(std::string& line){
    if(line.find(",") == std::string::npos){
        std::string out = line;
        line = "";
        return out;
    }
    std::size_t pos = line.find(",");
    std::string out = line.substr(0,pos);
    line = line.erase (0,pos+1);
    return out;
}
std :: string Areas :: getVariableCSV ( std :: string & line ) { if ( line . find ( " " ) == std :: string :: npos ) { std :: string out = line ; line = " " ; return out ; } std :: size_t pos = line . find ( " " ) ; std :: string out = line . substr ( 0 , pos ) ; line = line . erase ( 0 , pos + 1 ) ; return out ; }
Retrieve string form the head of CSV line, and then delete it's form that
line.
Retrieve string form the head of CSV line and then delete it ' s form that line .
//deletes outputted variable